Re: [csswg-drafts] [css-color-4] Do we actually need hwb()? (#6940)

My only real argument for maintaining HWB is that color pickers in many applications continue to use it as their input form, which suggests it continues to have some use. Chrome at some point switched to an HSL-ish form for `<input type=color>` and its DevTools colorpicker, but in the past used the "triangle and circle" HWB-style picker. I was just watching an artist's stream on Twitch the other day, tho, and whatever drawing program they were using still used triangle-and-circle, too.

> We shouldn't be adding new sRGB-only color formats (and even though this has been in the spec for 8+ years, it's new in browsers), instead we should gently guide authors away from the existing ones.

Valid. I wouldn't be too put out removing HWB, due to this precise reasoning.

> Color modification is now moving in a different direction and (OK)Lab/LCH are far superior for creating variations of an existing color and color-mix() is far superior for creating tints and shades (mixes with white and black) of any existing color.

Not really, at least for the case HWB is for. LCH and HSL are identical in terms of ease of creation/manipulation, and manipulating colors in HSL being kinda tricky is exactly why HWB exists; it's (reasonably, imo) argued that the lightness/saturation(chroma) plane is harder to work with, mentally, than the HWB triangle.

color-mix() isn't a substitute for readability/authorability, either, because you have to stack two of them together and it's way longer as a result. It is indeed easy to generate tints and shades from a base color out of it, which isn't what HWB was for anyway. (HWB made it reasonably easy to *manually* generate tints and shades of a base color that was *already* expressed in HWB, but had no ability to manipulate arbitrary colors.)

> It's not like there's any tooling that uses HWB either so we don't need to keep it around for compat with that.

Kinda sorta (see first paragraph) - the HWB mental model appears to still be used in quite a bit of tooling (but so is the HSL mental model)

> It would allow us to close 2 issues

I don't understand what you mean by this. The older of these issues is about *both* HSL and HWB, so you either can't close it (because it's unanswered for HSL) or can (because it's answered for both). The more recent one, about commas, was originally asked purely about HWB, but is *also* in fact about multiple color functions (all the recent ones), so again either we can close it because it's answered for *everyone*, or we can't close it because it's not answered for any of them. We have no open issues actually about the hwb() function itself, such that removing it would let us auto-close anything.



-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6940#issuecomment-1010385308 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 January 2022 21:42:49 UTC