- From: Isaac Muse via GitHub <sysbot+gh@w3.org>
- Date: Tue, 06 Feb 2024 16:44:06 +0000
- To: public-css-archive@w3.org
Okhsl is not a perfect representation of sRGB, it is an approximation. You can get away with clipping the colors within its bounds, that is what the author of Okhsl is basically doing in his color picker. Okhsl can create out of gamut colors, not greatly out of gamut, but out of gamut none the less. You could create variants for P3 and Rec. 2020 using the original script provided by the author to generate the necessary constants: https://colab.research.google.com/drive/1JdXHhEyjjEE--19ZPH1bZV_LiGQBndzs. I've done this in experiments, and it does work OK, but wider gamuts are more _fuzzy_ at the bounds. But there are less desirable aspects of these spaces when looking at them as a general purpose spaces. <img width="795" alt="Screenshot 2024-02-06 at 9 39 18 AM" src="https://github.com/w3c/csswg-drafts/assets/1055125/0b07d131-d616-4f8e-b3ca-f8346069e199"> <img width="786" alt="Screenshot 2024-02-06 at 9 34 59 AM" src="https://github.com/w3c/csswg-drafts/assets/1055125/f74de221-4cd3-403a-b3af-066591413187"> I'm sure these could be implemented in CSS preprocessor or even external color pickers if existing OkLCh color pickers are not sufficient, but I'm not sure CSS needs these spaces internally, but I'm sure some will disagree. I'm also not sure why color pickers such as https://oklch.com/ would not be sufficient either. People will adapt and tooling will emerge to help people. -- GitHub Notification of comment by facelessuser Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-1930316920 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 February 2024 16:44:09 UTC