oderwat / vscode-indent-rainbow

Extension which shows indentation with a faint rainbow colored background to make them more readable
MIT License
406 stars 53 forks source link

Option to follow theme's bracket colors #141

Open nodomw opened 1 year ago

nodomw commented 1 year ago

Title: I'd like to think this would be an aesthetically pleasing option for many people. I have manually set my indentation colours to work with the theme I use the most (see image below) and would love to see functionality to change this dynamically. sublime scss-1663531957

oderwat commented 1 year ago

I don't care, but if somebody puts up a PR, I will most likely accept it.

spartanatreyu commented 1 year ago

For me, I changed my brackets to match indent-rainbow's colors:

settings.json:

{
    // Other settings here...

    // Set bracket colors to match the rainbow indent extension's colours
    "workbench.colorCustomizations": {
        "editorBracketHighlight.foreground1": "#ffff40",
        "editorBracketHighlight.foreground2": "#7fff7f",
        "editorBracketHighlight.foreground3": "#ff7fff",
        "editorBracketHighlight.foreground4": "#4fecec",
        "editorBracketHighlight.unexpectedBracket.foreground": "#ff0000"
    },

    // Other settings here...
}
JosueEstrada commented 1 year ago

Hi, i like this style, you explain me how extract the #colors from theme?

spartanatreyu commented 1 year ago

If you want to pull out the colors from a theme, you can do this:

  1. Go to this folder: https://github.com/microsoft/vscode/tree/main/extensions

  2. Open the folder that holds your theme. My theme is monokai, so I opened the theme-monokai folder

  3. Find the theme json file (not the package.json file)

    So for my theme (Monokai), I can see the colors in: https://github.com/microsoft/vscode/blob/main/extensions/theme-monokai/themes/monokai-color-theme.json

    Some themes might have more than one json file, just pick the variation you want

  4. Either use the colors directly out of the theme, or put those colors into a program like photoshop or photopea and tweak the hue/saturation/lightness/etc... so that it's not the exact same color.