Re: [csswg-drafts] [css-color-4] Do gradients/animations using lab/lch colors interpolate in the Lab colorspace? (#4647)

The CSS Working Group just discussed `Do gradients/animations using lab/lch colors interpolate in the Lab colorspace?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Do gradients/animations using lab/lch colors interpolate in the Lab colorspace?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/4647<br>
&lt;dael> smfr: Thinking was if you spec lab colors you want uniform lightness. If you spec gradient with same lightness you would expect intermediate to have same lightness. There's an image in the thread with lab interpolation that looks nice<br>
&lt;dael> smfr: Someone would be looking for lightness behavior so makes sense to interpolate in lab space, but opens questions about if you have different spaces.<br>
&lt;dael> chris: Should be option to say what color space. We should have good defaults so it works how expected<br>
&lt;dael> leaverou: Bigger problem is most lab not in srgb gamut so results would be horrible. I think makes sense if two colors in same space you interpolate in that space. Else we use lab which is all visible color<br>
&lt;dael> florian: Agree with leaverou on the defaults.<br>
&lt;bkardell_> agree with lea as well<br>
&lt;dael> leaverou: Also preserves web compat so srgb is in srgb<br>
&lt;dael> AmeliaBR: Nice to be able to upgrade so you can use colors you have and say have transitions prettier<br>
&lt;dael> florian: Need syntax of that<br>
&lt;dael> chris: Working color space thing<br>
&lt;dael> leaverou: My heuristic only need one color to be lab to get lab interpolation. Relativizing you wrap one in lab and get all lab<br>
&lt;dael> myles: [missed]<br>
&lt;AmeliaBR> s/[missed]/What's the relationship between this and SVG `color-interpolation` property?<br>
&lt;smfr> s/[missed]/what is the relationship between this and the color-interpolation property in SVG<br>
&lt;dael> chris: In svg we have one for filters and one for everything else. svg had lineraized srgb. In practice we want to regard those as legacy. We can map to new, but not a great model going forward<br>
&lt;dael> myles: Why is it not a good go forward?<br>
&lt;dael> chris: You might want multi BG each with a gradient and in different spaces. One property means you control everything but more likely to want per gradient or per property<br>
&lt;dael> leaverou: Might have a gradient BG you define and a transition from a library you use and filter from something else<br>
&lt;dael> chris: IN other words want to avoid changing stuff people depend on and have unrelated things change under them<br>
&lt;dael> AmeliaBR: My main concern is people change color interp property for pretty color and then be surprised by other aspects of color<br>
&lt;Rossen_> q?<br>
&lt;dael> AmeliaBR: Related is we have inconsistent impl on which browser effects which property every with limited switch options it has<br>
&lt;dael> florian: leaverou approach solves this. If you want interpolation in right space wrap one color in lab<br>
&lt;TabAtkins> q+<br>
&lt;dael> dbaron: Wanted to ask how clearly defined it is to interp across any color space given prop if colors are in same space you inter in that space<br>
&lt;Rossen_> ack dbaron<br>
&lt;Zakim> dbaron, you wanted to ask about interpolation in arbitrary color spaces<br>
&lt;dael> chris: clearly defined but most rgb space is gamma corrected.<br>
&lt;Rossen_> ack TabAtkins<br>
&lt;dael> TabAtkins: Clearly defined means cannonical representaiton as number vector<br>
&lt;dael> AmeliaBR: Worth asking b/c >1 way to vercotize each color space. If we're able to interp in hsl the numeric vectors are different. similar lab has lch which is same space different vector<br>
&lt;dael> AmeliaBR: Is need to interp in other numbers?<br>
&lt;dael> chris: That was a default. There's an opt in to other space<br>
&lt;AmeliaBR> s/ are different/ are different from RGB, even though both use sRGB space/<br>
&lt;dael> dbaron: Interp at least for transitions and animations for gradiants is derrived from computed values. There is a section that already computs away distinction in forms of specifying. I think it needs to be clearly defined what values you're working with. We allow @color profile rules. I don't know a huge amount, but can you derive unique rules from color profile?<br>
&lt;dael> chris: Yes, you can deterine vecotrs and then profile interprets to colors.<br>
&lt;dael> dbaron: Spec should spell it out<br>
&lt;dael> chris: There's a few things raised by smfr that are obvious to me but not others so I plan an editing pass<br>
&lt;dael> TabAtkins: What things are we interp in. THere's gradient, compositing, transitions/animations. Gradients easy impl-wise. We already do it fake because ska doesn't pre-multiply colors. I think transitions/animations are driven manually so similarly fine to switch.<br>
&lt;dael> TabAtkins: No idea about imple difficulty to switch compositing. Seems deeply tied to library<br>
&lt;dael> leaverou: also filters<br>
&lt;dael> TabAtkins: Yes<br>
&lt;dael> AmeliaBR: Filters would be tied into deep graphics code<br>
&lt;myles> q+<br>
&lt;dael> chris: Most likely. Compositing I think most 3d engines do linear light compositing<br>
&lt;dael> smfr: Apple it's non-trivial to change compositing. I think we'll get into that with working color spaces. I don't think need to worry when doing intep for gradients<br>
&lt;dael> florian: My impression as well. Not sure where filters falls, though<br>
&lt;Rossen_> ack myles<br>
&lt;florian> q?<br>
&lt;dael> myles: chris you said there's an escape hatch. If I have two grarients I can use both?<br>
&lt;dael> chris: Working color space. Maybe want to use keywords too. Maybe something like the / to separate alpha.<br>
&lt;dael> fantasai: Could do that in keyword<br>
&lt;dael> AmeliaBR: Yeah. At front of gradient we define geometry and add an opional one that says do it in lab or srgb<br>
&lt;fantasai> s/in keyword/"in &lt;colorspace-keyword>"/<br>
&lt;florian> +1<br>
&lt;dael> myles: Have manual control and if you don't include it the system guesses sounds like a good solution.<br>
&lt;dael> Rossen_: Where are we with getting to resolution<br>
&lt;dael> TabAtkins: Transitions and gradients in different color spaces we use a default rule where if in same space do it there, mixed is lab. Make sure it's explained properly. With gradients have an explicit opt in to change the space. Not touching compositing until we figure out working color space. Need to think about filters<br>
&lt;dael> chris: Filters is in linear srgb so we can leave as is<br>
&lt;dael> AmeliaBR: It's a mix. css filters are srgb and manual svg are linear rgb. It's a mess, don't need messier until we figure out working color space<br>
&lt;dael> chris: I think we ahve enough to close and move to needs edits<br>
&lt;dael> Rossen_: With resolution?<br>
&lt;dael> chris: Title is does it happen in lab. Answer is yes. The specific question is answered<br>
&lt;dael> Rossen_: Don't need resolution<br>
&lt;dael> chris: Don't think so<br>
&lt;AmeliaBR> s/are linear rgb/are linear rgb but you can change it to srgb/<br>
&lt;dael> Rossen_: One ask; can you ask if you can use the illustraion in issue in the spec? It's great and would be super helpful<br>
&lt;dael> chris: Agree<br>
&lt;AmeliaBR> +1 to figures and examples!<br>
&lt;dael> chris: That use if fairly pdf specific, but I have been meaning to add some gradient examples<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4647#issuecomment-572175380 using your GitHub account

Received on Wednesday, 8 January 2020 17:34:01 UTC