Re: [csswg-drafts] [css-color-4] Achromatic colors converted to hue-ish spaces should treat hue as "missing", not NaN (#6107)

> The defaults here aren't intended for usage, they're just here to give us an answer for what to do when none "leaks out" into normal rendering. None of the defaults are actually useful, because if they're used the author has made a mistake. As such, I'd prefer to keep this as simple and straightforward as possible and leave everything at zero. (And fwiw, "transparent black" is used elsewhere as a "something's messed up but we need a color/image of something", so it's consistent at least.)

> Again, this is purely an error case, tho. An author should never use none directly in a color being displayed, just in colors being transitioned/animated.

I guess my hesitancy with going with zero-everywhere is that it _does_ kind of mostly work in practice, and that it's not clear that using `none` in colors to be rendered is an authoring error.

`rgb(255 none none)` behaving the same as `rgb(255 0 0)` makes a lot of sense and without the proper context I might assume, as an author, that `none` is a kind of `0` with interpolation benefits. The `color()` syntax affords even more flexibility: `color(xyz)`, `color(xyz 0)`, and `color(xyz none)` all produce the same result: `none = omitted = 0`. It sounds to me that we're one `alpha: none = omitted = 1` away from making `none` an integral part of the color toolkit, rather than insisting on authors not using it.

If `none` is in the spec (right there in every color syntax), and it mostly works as expected, is it really wrong?

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


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

Received on Monday, 4 October 2021 18:44:33 UTC