I'm unclear about how HSL colours are meant to be written. W3 has them like this:
color: hsl(120, 100%, 50%);
Whereas ThreeJs asks for them like this:
h — hue value between 0.0 and 1.0
s — saturation value between 0.0 and 1.0
l — lightness value between 0.0 and 1.0
I've seen HSL colours written both ways across the web and really don't get it - which is correct, and how do you convert between the two?
Cheers.
For CSS, the W3C Recommendation CSS Color Module Level 3 defines how HSL color values have to be specified in the
colorproperty:tl;dr:
The next version, CSS Color Module Level 4 (which is currently only an Editor’s Draft) specifies this better (and it seems that the hue argument can have more values):