VS Code: Disable colorized Brackets or change Bracket color

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# Table of Contents

  1. Disable colorized brackets in VS Code
  2. How to change Bracket Colors in VS Code

# Disable colorized brackets in VS Code

VS Code has built-in bracket colorization that is enabled by default.

vscode built in bracket colorization

If you need to disable bracket colorization:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type bracket and uncheck the Editor > Bracket Pair Colorization: Enabled checkbox.

disable bracket colorization

Once you uncheck the checkbox, the square brackets, curly braces and parentheses in your files will no longer be colorized.

disabled bracket colorization

Another thing you might have to disable is bracket guides.

Open your settings again and search for Bracket guides.

disable bracket guides

Make sure that bracket guides are set to false.

The settings control whether colorized, vertical and horizontal bracket pair guides are enabled or not.

# Disable colorized brackets in your settings.json file

You can also disable colorized brackets directly in your settings.json file.

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the following properties in your settings.json file.
settings.json
"editor.bracketPairColorization.enabled": false, "editor.guides.bracketPairsHorizontal": false, "editor.guides.highlightActiveBracketPair": false,

disable bracket pair colorization in settings json

The properties disable bracket pair colorization and bracket guides.

If you also want to disable indentation guides, add the following 2 properties.

settings.json
"editor.guides.indentation": false, "editor.guides.highlightActiveIndentation": false

# How to change Bracket Colors in VS Code

You can change the bracket colors by editing your settings.json file:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the following properties in your settings.json file.
settings.json
"editor.bracketPairColorization.enabled": true, "workbench.colorCustomizations": { "editorBracketHighlight.foreground1": "#50a7ee", "editorBracketHighlight.foreground2": "#f8d393", "editorBracketHighlight.foreground3": "#d995ee", "editorBracketHighlight.foreground4": "#76e0ec", "editorBracketHighlight.foreground5": "#a9ec67", "editorBracketHighlight.foreground6": "#b7c1d6", "editorBracketHighlight.unexpectedBracket.foreground": "#e04147" },

The colors can be set using the following formats:

  • #RGB
  • #RGBA
  • #RRGGBB
  • #RRGGBBAA

The editor.bracketPairColorization.enabled property enables bracket pair colorization.

The editorBracketHighlight.foreground properties go from 1 to 6 and determine the color of the brackets.

custom bracket colors

The editorBracketHighlight.unexpectedBracket.foreground property is used to set the color of erroneous, unexpected brackets that are likely a cause for a syntactical error.

If you have more than 6 brackets in a sequence, the colors rollover.

You don't necessarily have to set all 6 foreground properties.

I've also written an article on [how to jump to a closing bracket, parenthesis or tag in VS Code](- Jump to a closing Bracket, Parenthesis or Tag in VS Code).

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.