Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Color Level 5 #99

Open
2 of 6 tasks
devongovett opened this issue Mar 2, 2022 · 4 comments
Open
2 of 6 tasks

CSS Color Level 5 #99

devongovett opened this issue Mar 2, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@devongovett
Copy link
Member

devongovett commented Mar 2, 2022

v1.5.0 adds support for level 4, let's add support for level 5 as well: https://drafts.csswg.org/css-color-5/

  • color-mix()
  • color-contrast()
  • Relative color syntax
  • @color-profile
  • device-cmyk
  • convert colors using ICC profiles??

Not sure how stable the spec is. I think Firefox and Safari already have implementations of some of this under a flag.

@devongovett devongovett added the enhancement New feature or request label Mar 2, 2022
@svgeesus
Copy link

svgeesus commented Mar 7, 2022

Safari TP has support for color-mix(), color-contrast() and RCS. Firefox and Chrome are investigating color-mix() although one of those implementations is currently sRGB-only at the moment.

Support for CSS Color 4 and (parts of) CSS Color 5, specifically color-mix( and color-contrast() is part of Interop 2022 (see also Safari blog post on Interop 2022) so the latest versions of all major browsers are aiming to support this by the end of this year!

Which will intensify the support need for older browsers.

No browser currently has support for @color-profile or device-cmyk and those parts of the spec are not part of Interop 2022; but support is showing up in the CSS-to-PDF converters. So I could see down-conversion in parcel-css being useful for people targeting print/ebooks as well as Web.

devongovett added a commit that referenced this issue Sep 18, 2022
devongovett added a commit that referenced this issue Sep 18, 2022
@devongovett
Copy link
Member Author

Implemented the relative color syntax in 44a402d, passing the tests from WPT. 🥳 Only limitation is that it cannot work with variables due to being a build-time transform.

@hare0319
Copy link

Implemented the relative color syntax in 44a402d, passing the tests from WPT. 🥳 Only limitation is that it cannot work with variables due to being a build-time transform.

Em... Is there a way to perform this, now? Thanks

@LinusU
Copy link

LinusU commented Sep 7, 2024

I've submitted #808 for the contrast-color from CSS Color Level 6, which is the evolution of color-contrast() from Level 5 mentioned in the op here 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants