Can someone, @mia maybe , please explain what the outcome here was?
-
Can someone, @mia maybe , please explain what the outcome here was?
https://github.com/w3c/csswg-drafts/issues/9449
Problem: Instead of gamut mapping, finding the closest possible color, browsers crop RGB channels which results in unexpected colors for wide out of gamut combinations because lightness is not preserved. < Right?
Proposed solution: Gamut map all device independent color spaces to Rec.2020. RGB color spaces don't gamut map. < What does that mean?
That's only the first step. Goal: map to device gamut.
-
Matthias Ottreplied to Manuel Matuzović last edited by
@matuzo As I understand it, it’s like with a clipping audio signal: how do you handle values that are out of range (= the color space)? Will the “signal” be “cut off” or is the whole spectrum of colors (or lightness) mapped to the available (device) color gamut?
Maybe this toot helps a bit as well? @svgeesus is probably your man, anyway… https://mastodon.social/@svgeesus/111928206445778096
-
@matthiasott @matuzo @[email protected] @[email protected] Browsers clip rather than mapping because it's easier, and matches better what images/canvas do.
The proposed solution is mapping into rec2020 (an approximation of colors that could someday be rendered by screens) and clipping from there. That ensures forward compatibility, removes mapping based on monitors, and still gives better results than currently.
(But then everything went silent, and i don't know if there's been any progress behind the scenes)
-
@mia @matthiasott @matuzo @[email protected] If the stylesheet contains an Oklch color outside 2020, what is the specified value? The original one or the mapped one?
What is the mapping function?The CSSWG resolution is silent on that. I don't know how to write spec text for such a handwavy resolution.
-
@[email protected] @matthiasott @matuzo @[email protected] Yeah, I think we're waiting on someone (???Chris Cameron???) to review mapping functions?
I would expect specified value to be unmapped, but I don't know in practice which is actually more reliable (either for authors or implementors). Could try speccing whichever you think is better? But yeah, I think we need to get this on an agenda again?
-
Manuel Matuzovićreplied to Mia last edited by [email protected]
@mia @svgeesus @matthiasott I just watched @svgeesus 's talk at CSS day in 2022. At 31:35 they say "CSS actually says, if you need gamut mapping this is how you do it. The absolute worst way to do it is to just truncate all the values, the once that are negative or greater than 1. That gives you massive hue shifts. That''s what most browsers do now".
I missed that the first time watching.