- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Sep 2021 17:00:46 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Achromatic color conversion`, and agreed to the following: * `RESOLVED: Accept proposal to have 'none' / NaN represent missing channel` <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: Achromatic color conversion<br> <TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/6107<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/6107<br> <fantasai> chris: Several situations where polar color can have undefined hue<br> <fantasai> chris: e.g. gray, it doesn't have a chroma so it doesn't have a hue angle<br> <TabAtkins> proposal: https://github.com/w3c/csswg-drafts/issues/6107#issuecomment-929390142<br> <fantasai> chris: this can occur quite a bit<br> <fantasai> chris: in code this is often represented as Not A Number<br> <fantasai> chris: if interpolating, ifyou don't have a hue and the other color has a hue, then you take that hue<br> <fantasai> chris: so it's not the same as picking a random hue<br> <fantasai> chris: There was a bunch of discussion<br> <fantasai> chris: and the agreement was to do it like that<br> <fantasai> chris: which has knock-on effects in OM<br> <fantasai> chris: but the question is, what do we return<br> <fantasai> chris: is it NaN or missing or what<br> <fantasai> TabAtkins: Proposed that a color can be missing any of its components<br> <fantasai> TabAtkins: Author can specify with 'none'<br> <fantasai> TabAtkins: if interpolating between two colors and one has 'none', it takes the other side's value the entire time<br> <fantasai> TabAtkins: this is similar to behavior with premultiplied alpha<br> <fantasai> TabAtkins: if you either transition between two colors that are missing a channel<br> <fantasai> TabAtkins: treat that as an error<br> <fantasai> TabAtkins: reflecting this, in CSS syntax it's a keyword<br> <fantasai> TabAtkins: typedOM reflects that keyword<br> <fantasai> TabAtkins: in color API, unclear whether we want to reflect as null or NaN<br> <fantasai> TabAtkins: null is more ideomatic in WebPlatform<br> <fantasai> TabAtkins: but in other color APIs tend to use NaN<br> <fantasai> TabAtkins: Nan is more infectious<br> <fantasai> TabAtkins: so if trying to combine NaN with other number, get Nan<br> <fantasai> TabAtkins: I think Chris and Lea prefer NaN<br> <fantasai> TabAtkins: so proposal is to go with that for the missing color channel<br> <fantasai> fantasai: So what happens if you specify none for a channel that can't handle it?<br> <fantasai> TabAtkins: set to zero<br> <fantasai> Rossen_: any objections?<br> <fantasai> RESOLVED: Accept proposal to have 'none' / NaN represent missing channel<br> <fantasai> smfr: Do we have to parse NaN in <number> context?<br> <fantasai> TabAtkins: no, it's only useful as a keyword in calc()<br> <fantasai> TabAtkins: math functions can see NaN along with infinity, e, and pi<br> <fantasai> smfr: So no need to construct NaN as color input anywhere?<br> <fantasai> TabAtkins: if NaN tries to escape calc(), it gets censored into infinity<br> <fantasai> TabAtkins: which gets clamped by the range of that context<br> <fantasai> TabAtkins: so no HSL with NaN<br> <TabAtkins> hsl(calc(NaN * 1deg), 50%, 100%)<br> <TabAtkins> ^^^ just renders as an arbitrary hue, whatever the largest angle you can hold is<br> <fantasai> Rossen_: OK, let's end here. Thanks everyone for attending.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6107#issuecomment-930361511 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 September 2021 17:00:48 UTC