- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 02 Aug 2022 15:17:27 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `premultiplication and undefined values`, and agreed to the following: * `RESOLVED: Specify how none is carried across color space conversion to a related component on the other side` <details><summary>The full IRC log of that discussion</summary> <TabAtkins> Topic: premultiplication and undefined values<br> <TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/7536<br> <TabAtkins> chris: we ahve some stuff abou thow to convert colors<br> <TabAtkins> chris: first, nones get replaced by zero, bc you need a number to convert<br> <TabAtkins> chris: we also have text to interpolate, which says if one has none it takes the value from the other<br> <lea> s/ahve/have/<br> <TabAtkins> chris: This avoids interpolating an achromatic to chromatic where it starts from an essentially random color<br> <TabAtkins> chris: These assume the space you're specified and interpolated in are the same<br> <TabAtkins> chris: If they're not, the conversion happens and you lose the info<br> <TabAtkins> chris: There's also the issue taht if you're using two different color spaces, what to do?<br> <TabAtkins> chris: If you have one in lch and one in hsl, do you copy the hue angle even if it's a different color?<br> <TabAtkins> chris: it starts not making sense unless the values you're comparing nones for are in the same color space<br> <TabAtkins> chris: then the question was, do we want this anyway?<br> <TabAtkins> chris: We started with saying tha tsometimes the channel was NaN<br> <TabAtkins> chris: and i was convinced to change it to none<br> <TabAtkins> chris: for consistency we added it everywhere, including in places no one asked for it<br> <TabAtkins> chris: that's extra testing, what's the point, etc<br> <lea> q+<br> <TabAtkins> chris: it does help i nsome cases - if you have two in the same polor color space, it helps<br> <Rossen_> ack lea<br> <TabAtkins> lea: for none to resolve, you clearly need to convert to the same color sapce<br> <TabAtkins> lea: no question<br> <TabAtkins> lea: but there's a question of how to convert if both colors can have none<br> <TabAtkins> lea: i don't think having none everywhere created new problems, they exist even if it's only present in hues<br> <TabAtkins> lea: we need to figure it out regardless of if it's allowed in rgb, etc<br> <Rossen_> q?<br> <TabAtkins> chris: i don't think that transporting nones from one color to another when they're in another color space is *useful*, it's just the only thing to do from the spec text<br> <TabAtkins> chris: but it doesn't make a lot of sense<br> <TabAtkins> florian: do you have an idea of the solution<br> <fantasai> TabAtkins: I disagree that it doesn't make sense when they're in different color spaces<br> <fantasai> TabAtkins: if you take achromatic hsl into chromatic lch<br> <fantasai> TabAtkins: it's ...<br> <lea> q+<br> <fantasai> TabAtkins: if you wanted to maintain intent of none behavior, I think answer is convert using the same rules, and remember the noneness and apply it on the other side of the conversion<br> <fantasai> miriam: that only seems possible with hue, though, right?<br> <fantasai> TabAtkins: powerlessness extends across conversions, right?<br> <fantasai> TabAtkins: if your hue is none and you convert to RGB ...<br> <fantasai> miriam: if your R, G, or B is none and you convert to hue, how do you do the conversion?<br> <fantasai> chris: to restate, you take which component names have none, then you do the conversion, and if that component name exists in the result ...<br> <fantasai> chris: if you convert hsl to lch, they both have hues<br> <fantasai> chris: but if you convert to profoto rgb, then no place to put it<br> <fantasai> TabAtkins: if you have zero chroma, should be same as ???<br> <fantasai> TabAtkins: so need to some manual mapping of what coverts to what as nones<br> <fantasai> TabAtkins: but e.g. polar to rectangular or vice versa wipes out the info<br> <fantasai> lea: even if going from hsl to lch, ...<br> <fantasai> lea: do we really want none^2/2?<br> <Rossen_> ack lea<br> <fantasai> TabAtkins: treat none as zero, convert it over, remember that the hue was zero, and then none it<br> <fantasai> lea: so would need to rmeember that hue in hsl and lch relate<br> <fantasai> TabAtkins: chroma and saturation should also map<br> <fantasai> TabAtkins: lightness should map<br> <fantasai> TabAtkins: if we want to maximize author friendliness of original intent, we need to set up a map of which channels can carry noneness into other profiles<br> <fantasai> lea: how would that work with custom profiles?<br> <florian> q?<br> <fantasai> TabAtkins: probably can't do it with custom profiles<br> <fantasai> lea: another suggestion is to ditch none altogether and handle achromatic colors specially, same as how we handle transparent colors specially<br> <fantasai> lea: it's not as elegan<br> <fantasai> TabAtkins: only objection there is one of the uses for none is to handle things without chroma that do have a definite hue<br> <fantasai> TabAtkins: e.g. things like white and black, they have undefined chroma as well<br> <fantasai> TabAtkins: so they don't go from zero chroma into white chroma red<br> <TabAtkins> s/white/bright/<br> <Rossen_> ack dbaron<br> <fantasai> dbaron: It would probably be useful to look the mapping from basically a table that shows what components in this color influence what components in ths other color<br> <fantasai> dbaron: for example, when convering hsl to lch, which components of hsl influence l in lch, etc.<br> <fantasai> dbaron: that might be useful<br> <fantasai> dbaron: it sounds like you want to transfer noneness in some cases beyond where it's strictly ok?<br> <fantasai> TabAtkins: less probably<br> <fantasai> dbaron: my intuitino is it would strictly be okay only where the inputs to the value were the ????<br> <fantasai> dbaron: I think<br> <fantasai> TabAtkins: might be, not 100% certain<br> <fantasai> dbaron: do more than that, but look at these tables and see what you want to do<br> <fantasai> dbaron: assuming you want to go down that path<br> <fantasai> chris: in genera, prefer ...<br> <fantasai> chris: but if I have a none alpha, and I convert to zero, and then I get transparent black, then ...<br> <fantasai> TabAtkins: we only premultiply during transitions right?<br> <fantasai> TabAtkins: idk if we've specifyed more clearly<br> <fantasai> chris: we have<br> <fantasai> TabAtkins: srgb is stored premultiplied?<br> <fantasai> chris: no, but when you interpolate you premultiply<br> <una> q+<br> <fantasai> miriam: but at that point you've already done the replacement<br> <fantasai> dbaron: is it possible you want the math for none to be different for different plcaes where you can put a none?<br> <lea> q+ to answer dbaron<br> <fantasai> chris: I think good thing about Tab's proposal is you don't have to handle none through the entire calculation chain<br> <fantasai> chris: just put it back at the end<br> <fantasai> dbaron: was suggesting for alpha cases, but maybe you want to treat it as 1 rather than zero<br> <fantasai> TabAtkins: yes, when you do conversoin you turn it into a number, and that's already in the spec<br> <fantasai> dbaron: ah, I thought someone said it's always zero<br> <fantasai> chris: it is<br> <fantasai> TabAtkins: even for alpha?<br> <fantasai> lea: maybe alpha should be 1<br> <una> q-<br> <fantasai> TabAtkins: alpha isn't involved in color space conversions<br> <Rossen_> ack lea<br> <Zakim> lea, you wanted to answer dbaron<br> <fantasai> lea: for HSL and LCH, for example, I think basically all components influence all components, it's jus thtat some components influence some other components more<br> <fantasai> lea: hue and lightness still influence every component, because not 1-1 mapping<br> <fantasai> dbaron: that was my intuition, especially once you're converting between d50 and d65 then you're definitely<br> <fantasai> TabAtkins: my intention was to put a table of what components map across, only a handful to worry about<br> <fantasai> TabAtkins: all the hue-ish things, all the red-green-blue-ish things'<br> <fantasai> Rossen_: that's the action out of this issue?<br> <fantasai> TabAtkins: proposed resolution is we specify how none is carried across color space converstion to a related component on the other side<br> <fantasai> Rossen_: objections?<br> <fantasai> RESOLVED: Specify how none is carried across color space conversion to a related component on the other side<br> <TabAtkins> ScribeNick: TabAtkins<br> <dbaron> (I do wonder how the stability of this relates to stability of other features in color 4.)<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7536#issuecomment-1202799109 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 2 August 2022 15:17:29 UTC