Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does Revioletd in consecutivePairColors mean? #2

Open
Wujidadi opened this issue Jan 9, 2023 · 1 comment
Open

What does Revioletd in consecutivePairColors mean? #2

Wujidadi opened this issue Jan 9, 2023 · 1 comment

Comments

@Wujidadi
Copy link

Wujidadi commented Jan 9, 2023

This is a wonderful extension that solved the regret of that there are only 6 levels of bracket colors in VSCode built-in editorBracketHighlight configurations. Thanks for the work!

I've noticed that there is a Revioletd value in the RainbowBrackets.consecutivePairColors config from the example. This value is required but I don't know what its effects are or whether it could be other values. May I ask what does it mean?

@AlexanderInova
Copy link

AlexanderInova commented Aug 9, 2024

I was just wondering about the same question, so I had a look into the code. The settings seems to be squashed into a single array and expects the following elements: One or more strings containing the type of brackets to highlight, followed by an array of colors to use and the "orphaned color" as the last element of the outer array.

So the explanation of the default configuration would be:

{
  "RainbowBrackets.consecutivePairColors": [
    
    // One or more pairs of brackets can be specified (exactly two characters each)
    "()",       // Enables rainbow colors for parentheses
    "[]",       // Enables rainbow colors for square brackets
    "{}",       // Enables rainbow colors for curly brackets

    // An array of colors can be specified for bracket highlighting
    [
      "teal",   // Uses teal color for pair highlighting
      "yellow", // Uses yellow color for pair highlighting
      "tomato"  // Uses tomato color for pair highlighting
    ],

    // The color for orphaned brackets
    "Revioletd" // Uses Revioletd color for orphaned brackets
  ]
}

The color "Revioletd" doesn't seem to be an actual color. If there isn't some magic I don't know about, I would assume that the value was previously "Red" and the programmer wrote "violet" into it. But who knows...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants