Nice colour scheme / syntax highlighting: dimmed types

Not a question, just wanna share an upgrade to my colour scheme for Julia in VS Code, which others might find pleasing too.

What it looks like:

Dark mode:

Light mode:

These are the themes “One Dark Pro Darker” (from ‘One Dark Pro’) and “Bluloco Light”; but with types (and ends) dimmed.

Without the dimming of types, I find some pieces of code to be more visually cluttered and strenuous to read.

This dimming can be achieved by an addition like the following to your settings.json:

    "editor.tokenColorCustomizations": {
        "[One Dark Pro Darker]": {
            "textMateRules": [
                // Dim `end`s in Julia.
                {
                    "scope": "keyword.control.end.julia",
                    "settings": {
                        "foreground": "#c678dd3f" // original: #c678dd
                    }
                },
                // Color Types differently than variables.
                {
                    "scope": "support.type.julia",
                    "settings": {
                        "foreground": "#abb2bf4e",
                    }
                },
                // (and this is for the `::`)
                {
                    "scope": "keyword.operator.relation.types.julia",
                    "settings": {
                        "foreground": "#abb2bf4e",
                    }
                }
            ]
        },
        "[Bluloco Light]": {
            "comments": "#9e9fa5", // original: #A0A1A7
            "textMateRules": [
                {
                    "scope": "keyword.control.end.julia",
                    "settings": {
                        "foreground": "#0097dd4d" // original: #0098DD
                    }
                },
                {
                    "scope": "support.type.julia",
                    "settings": {
                        "foreground": "#383a4277",
                    }
                },
                {
                    "scope": "keyword.operator.relation.types.julia",
                    "settings": {
                        "foreground": "#7a82da8f",
                    }
                }
            ]
        },
    },

I.e. I lowered the alpha values of the original colours.

(Note that you can find the ‘scope’ for certain tokens yourself, as well as their original colour, using the Developer: Inspect Editor Tokens and Scopes command).

(Thanks to @pfitzseb for the lead here: VSCode syntax highlighting : Dimming `end`s - #4 by pfitzseb)

4 Likes