Closed AmjadHD closed 2 years ago
If there is some kind of request here, above and beyond what is already supported, do let me know as I do have a release ready to go.
Sorry I didn't notice the hsv support, and didn't know about the color(...)
syntax, that's handy.
Yeah, I don't really advertise them all directly. Most people are looking for CSS color support, but we actually can do a bit more than that.
ColorHelper already supports HSV, that's how we provide the HSV color picker:
All the supported color spaces are listed here in ColorAides' documentation: https://facelessuser.github.io/coloraide/colors/.
Now, I'm not sure in what context you are attempting to use HSV. When I implement colors in ColorAide, currently, the default syntax is
color(identifier channel1 channel2 ... / alpha)
. Basically, we are using CSS Level 4 syntax to represent all colors. Granted,color()
is currently defined in the CSS syntax to represent rectangular colors only, but they are playing with the idea of possibly extending it to all colors. Currently, we extend it to all colors as a generic syntax.Now, any color that is not a supported color in CSS or does not specifically supports the
color()
syntax in CSS gets a custom identifier (color(--custom ...)
). HSV is not a supported CSS color, so it is defined ascolor(--hsv h s v / a)
, whereh
is hue,s
is a saturation between 0 - 1,v
is a value between 0 - 1. You can optionally use percentages fors
andv
if desired.Custom color spaces are not searched in any file type by default as we have configured the default rules to ignore finding custom
color()
indentifiers (--id
).But, you can still enter them in certain modes. Here we mix HSV colors in Oklab.
While Oklab and Oklch were recently added in the CSS Level 4 specification, we have yet added the official CSS syntax as a default input/output as there is still some discussion on the final syntax going on, so it is also only implemented in the
color(--custom ...)
form.