Contact emails
Specification
https://drafts.csswg.org/css-color-4/#specifying-lab-lch
TAG review
https://github.com/w3ctag/design-reviews/issues/488
Chromium bug
Summary
CSSWG has added the lch() and lab() functions to the CSS Color Module Level 4 specification. These are based on the CIE LAB color space, which is able to represent colors in a way that closely matches human perception. The purpose of this intent is to implement the functions lch() and lab() as described in the CSS spec.
Motivation
These new functions will enable design tools and design systems to handle colors with higher richness, fidelity, and flexibility, as well as improved accessibility. Supporting this functionality will also help unblock other color related additions to CSS.
Risks
Interoperability and Compatibility
There is interest on the part of Web developers and designers, although they might not take full advantage of this feature until it is eventually supported by more browsers and design tools.
Edge: No signals
Firefox: In development https://bugzilla.mozilla.org/show_bug.cgi?id=1352757
Safari: In development https://bugs.webkit.org/show_bug.cgi?id=205675
Web / Framework developers:
Blog post explaining the motivation for the lab() and lch() CSS functions: https://bkardell.com/blog/Unlocking-Colors.html
"The Evolution of CSS 4 Color" conference talk: https://www.w3.org/Talks/2016/css4-color-talk/
PostCSS plugin to make this functionality available to Web developers: https://github.com/jonathantneal/postcss-lab-function
Ergonomics
This feature will have no impact on the browser's ability to maintain good performance.
Activation
Developers could start using this feature right away but might be wary of doing so until other browsers implement it as well, so polyfills or preprocessor plugins might be useful.
Debuggability
The CSS editor in DevTools should support the use of the lab() and lch() functions to specify colors. I will contact https://groups.google.com/forum/?fromgroups#!forum/google-chrome-developer-tools to discuss this.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Yes.
Tests are lab-001 to lab-007 and lch-001 to lch-007 in:
https://wpt.fyi/results/css/css-color?label=experimental&label=master&aligned
https://github.com/web-platform-tests/wpt/tree/master/css/css-color
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/4592567062626304
Requesting approval to ship?
Not at this moment. I would like to have the opinion of more experienced contributors on whether it would make sense to implement-and-ship.
IMHO, you should implement this behind a runtime flag (specially now
that the Chromium schedule is on hold) and once everything is ready send
an intent-to-ship to turn the flag on by default.
Debuggability
The CSS editor in DevTools should support the use of the lab() and lch() functions to specify colors. I will contact https://groups.google.com/forum/?fromgroups#!forum/google-chrome-developer-tools to discuss this.
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/4592567062626304
Requesting approval to ship?
Not at this moment. I would like to have the opinion of more experienced contributors on whether it would make sense to implement-and-ship.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/41b32b56-2da2-421d-987a-3b28fbc16eb1%40chromium.org.
…
I had a look at the tests. They are basically all the same test with different parameters. To qualify as "fully tested" we should have tests for (off the top of my head):
- Basic painting (which is what we already have)
- css-om, for both specified and computed styles
- css-typed-om, for both specified and computed styles
- Transitions, animations
- Gradients
- Passing and using the color in a paint worklet
- CSS.registerProperty with "<color>" syntax
On Monday, 23 March 2020 18:18:53 UTC+9, Anders Hartvoll Ruud wrote:…I had a look at the tests. They are basically all the same test with different parameters. To qualify as "fully tested" we should have tests for (off the top of my head):
- Basic painting (which is what we already have)
- css-om, for both specified and computed styles
- css-typed-om, for both specified and computed styles
- Transitions, animations
- Gradients
- Passing and using the color in a paint worklet
- CSS.registerProperty with "<color>" syntax
Some of those items might require a bit of spec work in order to agree what the desired output would be.
Gradients, for example, could be a good use case for this feature (e.g. you could define two color-stops of the same luminosity and expect a gradient where that luminosity is preserved throughout)
but this is not part of the spec at the moment.
On Monday, 23 March 2020 10:50:27 UTC-4, Felipe Erias Morandeira wrote:
On Monday, 23 March 2020 18:18:53 UTC+9, Anders Hartvoll Ruud wrote:…I had a look at the tests. They are basically all the same test with different parameters. To qualify as "fully tested" we should have tests for (off the top of my head):
- Basic painting (which is what we already have)
- css-om, for both specified and computed styles
CSSWG recently agreed to move the serialization of color from CSSOM to the CSS Color spec. Making those edits is on me. There has been active discussion on how to serialize. So I agree this needs to be tested, but it also needs to be fully specced too.
- css-typed-om, for both specified and computed styles
Agreed.
- Transitions, animations
Yes
- Gradients
Yes, and that also depends on recent discussions of Working Colorspace. I plan to add an example to the spec soon, showing how different color models can be used in gradients.
- Passing and using the color in a paint worklet
Could you explain more about tht one, what exactly you would like to see tested?
- CSS.registerProperty with "<color>" syntax
Oh, nice. I suspect the spec is not up to date there.Some of those items might require a bit of spec work in order to agree what the desired output would be.Yes.Gradients, for example, could be a good use case for this feature (e.g. you could define two color-stops of the same luminosity and expect a gradient where that luminosity is preserved throughout)I suspect you mean Lightness, not luminosity. But yes, that would be a good example.but this is not part of the spec at the moment.Right, the working colorspace section needs to be worked on first, then things like gradients, compositing, animations and transitions will follow from that.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/5ec8e0e8-b56d-41f4-ba02-45e8eeb41e5b%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADnb78jy22Mn0VZ-bG9OtLy01CinMSsO_27oFNZ6_%3Dz9-TXk%3DQ%40mail.gmail.com.
If lab() can't be accurately represented in RGB, would there be any value in shipping lab() support which converted to RGB lossily for painting?
If lab() can't be accurately represented in RGB, would there be any value in shipping lab() support which converted to RGB lossily for painting
Can you confirm that dbaron is correct about lab colors not being (accurately) representable in RGB with 0-255 per component, and that we can't simply convert to RGB before painting? We are trying to figure out if our 0-255 per component blink::Color is enough, or if we'd need to change it.
If lab() can't be accurately represented in RGB, would there be any value in shipping lab() support which converted to RGB lossily for painting?