RGB HEX With alpha support
Closed this issue · 2 comments
Hi,
The extension fails to recognize this color #F4A46080
. This is this #F4A460
with alpha =>50%. I know the first format is not valid in CSS file but it works in settings.json file for instance in workbench.colorCustomizations
section.
I'd love you add preview for this kind of format.
Just published 0.5.0 that includes support for 4 and 8 digit hex+alpha
colors
VS Code version | OS | Extension version |
---|---|---|
1.13.1 | Win x64 pro (french) | 0.5.0 |
Just a note
settings.son sample used as example for the statements below:
"workbench.colorCustomizations": {
"dropdown.border": "#FFFFFF4D",
"dropdown.background": "#000",
"dropdown.foreground": "#DCDCDC",
}
Yes it works for JSON file only if you set:
"colorInfo.languages": [
{
"selector": "json",
"colors": "hex+alpha"
}
]
OR
"colorInfo.languages": [
{
"selector": "json",
"colors": ["hex+alpha","css","hex","rgb","hsl","css-color-names"]
}
]
But setting won't work
"colorInfo.languages": [
{
"selector": "json",
"colors": "css"
}
]
Hover over "dropdown.border": "#FFFFFF4D"
doesn't trigger the color info tooltip. Same for color name like either: gold. You have to set: "colors": ["hex+alpha","css","hex","rgb","hsl","css-color-names"]
for json files if you want all supported colors. "colors": "css"
won't be enough.
But no issue with CSS files with:
"colorInfo.languages": [
{
"selector": "css",
"colors": "css"
}
]
"colors": "css"
will really support all the colors type.
So the css color element doesn't really stand for all css color value types as it is said in doc.