My trick is to use different editors with different color schemes. IntelliJ for Scala, VSCode for Python. My brain switches immediately.