Custom Bracket Colors in VS Code's Built-In Bracket Colorizer
VS Code now has built-in bracket colorization (as of version 1.6). This means you no longer need the "Bracket Colorizer 2" extension! Missing from the Release Notes is how to set custom colors! Here's how to set your own custom bracket colors.
Update settings.json for custom bracket colors in VS Code
You can customize your the colors of your brackets using VS Code's built-in bracket colorizing feature by updating settings.json
. You can supply up to six colors. Additionally, you specify the color for an unmatched bracket.
Use the following settings as an example:
"editor.bracketPairColorization.enabled": true,
"workbench.colorCustomizations": {
"editorBracketHighlight.foreground1": "#FFCC66",
"editorBracketHighlight.foreground2": "#7FCDFF",
"editorBracketHighlight.foreground3": "#B084EB",
"editorBracketHighlight.foreground4": "#FF75BC",
"editorBracketHighlight.foreground5": "#93FEC0",
"editorBracketHighlight.foreground6": "#abb2c0",
"editorBracketHighlight.unexpectedBracket.foreground": "#db6165"
},
P.S. This blog post was an interesting deep-dive into the performance enhancements done by the VS Code team. They achieved a 10,000x speed improvement by baking the functionality into the core application.
Happy colorful coding.