how to bring the vscode css color picker feature into js file with string that match color name format?

Ezeewei picture Ezeewei · May 25, 2018 · Viewed 7.8k times · Source

https://code.visualstudio.com/docs/languages/css

None of the current plugin able to do so. I am really surprised. even intellij has this support!

Also the reply from vscode itself is a bit not helpful either. https://github.com/Microsoft/vscode/issues/36485

Any hint on how to build such plugin, seems shouldn't be really hard since its really just porting the feature from one file extension to another?

Anyone able to resolve this?

Answer

Boris Yakubchik picture Boris Yakubchik · Jul 28, 2019

I found colorize which can highlight JavaScript and TypeScript (among others) GitHub

In your settings.json in VSCode just add languages you'd like to target:

"colorize.languages": ["typescript", "javascript", "css", "scss"]

enter image description here