Learn how to highlight different color combinations of your code in Visual Studio.

How to highlight colors (rgb, hex, hsl, rgba) in Visual Studio Code

In this very short tutorial, we'll explain you quickly how to install the Color Highlight package to highlight any color in your active code tab in Visual Studio Code.

Search and install Color Highlight

Open Visual Studio Code and go to the Extensions tab and search for the Color Highlight package and click on install:

Color Highlight Install Visual Studio

This extension styles css/web colors found in your document, whatever the syntax it is (CSS, Java, HTML, Python etc). If it detects a color code with any of these syntax:

  • HEX
  • RGB
  • RGBA
  • HSL

It will be highlighted, even when it's inside commentaries of the programming language. For more information about this package, please visit the official repository at Github here.


Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Become a more social person

Sponsors