how to bring the vscode css color picker feature into js file with string that match color name format?
To anyone who uses Colorize and wants it to work on their React project (css in js and such):
use
"colorize.languages": ["javascriptreact", "javascript", "css", "scss"]
as apparently "javascriptreact" is needed and not "javascript"
There is one possible implementation with vscode-color-info
from wayncheng
Adding the following code to colorInfo.languages in settings.json should do the trick. Make sure to include all the default languages as well so they aren't disabled.
{ "selector": "javascript", "colors": "css"}
So your settings.json should look something like this:
"colorInfo.languages": [ { "selector": "css", "colors": "css" }, { "selector": "sass", "colors": "css" }, { "selector": "scss", "colors": "css" }, { "selector": "less", "colors": "css" }, { "selector": "html", "colors": "css" }, { "selector": "javascript", "colors": "css" }]