Implements HWB (Hue, Whiteness, Blackness) function coloring
Supports decimals and spaced values (e.g. color: rgb(0 16.99 136))
Support legacy HTML3-style colors (e.g. <body text="blue"> and <font color="#abcdef">)
Probably some more
Benchmark testing showed no appreciable increase in cost to run, but I don't like how inconsistent its stats are.
To implement hwb(), I abstracted hsl2color() to hsl2rgb() in order to retain the RGB channels. While at it, I also converted the other similar functions so there's now only one place where RGB is converted to hexadecimal representation.
-o
doesn't work)color: rgb(0, 17, 136 / 100%)
)color: hsl(167grad, 30%, 60%)
)color: rgb(0 16.99 136)
)<body text="blue">
and<font color="#abcdef">
)Benchmark testing showed no appreciable increase in cost to run, but I don't like how inconsistent its stats are.
To implement
hwb()
, I abstractedhsl2color()
tohsl2rgb()
in order to retain the RGB channels. While at it, I also converted the other similar functions so there's now only one place where RGB is converted to hexadecimal representation.