Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Brace Block ColorsNew to Visual Studio Code? Get it now.
Brace Block Colors

Brace Block Colors

patrick corral

|
2 installs
| (0) | Free
Gives every { } block its own unique, semi-transparent background color so you can see each scope at a glance.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Brace Block Colors

Each top-level { … } block gets its own background color at 50% transparency, from its first { to its matching last }, so you can see each block at a glance. Braces nested inside share the outer block's color.

Switch modes anytime: click Blocks: … in the status bar, press Ctrl+Alt+Shift+B, or run Brace Block Colors: Switch Mode from the Command Palette. Each click moves to the next mode:

  1. Outer: one color per top-level block, from its first { to its last }
  2. Every: every block, including nested ones, gets its own color
  3. Brackets: only the { and } characters are colored, and each matching pair gets its own color
  4. Off: no coloring. The next click goes back to Outer.
  • No two blocks share a color. Colors step around the hue wheel by the golden angle (an irrational fraction of a full turn), so hues never repeat, and neighboring blocks land far apart. Saturation and lightness also cycle for extra contrast.
  • In "every" mode, nested blocks show their own color. Each character is painted only by its innermost block, so a child block isn't muddied by its parent's color stacked underneath.
  • Braces inside strings and comments are ignored (configurable).
  • Updates live as you type.

Install

In VS Code, open the Extensions view (Ctrl+Shift+X), search for Brace Block Colors, and click Install.

Settings

Setting Default
braceBlockColors.enabled true Turn coloring on/off (also: command Brace Block Colors: Toggle)
braceBlockColors.mode "outermost" "outermost": one color per top-level block · "every": every block colored · "brackets": only the braces colored
braceBlockColors.opacity 0.5 Background transparency
braceBlockColors.ignoreStringsAndComments true Skip braces in strings/comments
braceBlockColors.excludedLanguages ["plaintext","markdown"] Languages to skip
braceBlockColors.maxBlocks 2000 Performance cap per file
braceBlockColors.maxFileSize 500000 Skip huge files (characters)
braceBlockColors.updateDelay 150 Debounce after typing (ms)

Developing

Open this folder in VS Code and press F5 to launch an Extension Development Host with the extension loaded.

Known limits

  • Braces inside ${ } in JavaScript template literals are treated as part of the string.
  • Empty lines inside a block aren't painted (VS Code decorations only color text, not blank space).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft