skip to Main Content

tailwind.config.js file

I have some custom colors defined, VSCode does not show color previews and I have to manually check to remember which one to use, even with color naming. Are there any settings/extensions that allow me to preview the HSL colors defined in the values?

2

Answers


  1. Chosen as BEST ANSWER

    I found the extension called Color Highlight. https://github.com/enyancc/vscode-ext-color-highlight


  2. Since vscode v1.78 you can do this (note that is in a js file):

    enter image description here

    Make sure these two settings are enabled:

    Editor: Color Decorators
    Editor: Default Color Decorators
    

    That second setting means that non-css type files, like javascript, will also get a color decorator. An extension could specifically provide a ColorDecorator or if not use the default color decorator (i.e., the one that provides a color decorator for css-type files.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search