Re: [csswg-drafts] [css-color-4] Concerns about color() function fallback (#5931)

I also really like the "color space fallback" solution. Assuming the author hasn't just messed up, the way this is going to come into play is if the profile is unavailable. Lea's suggestion would almost certainly be the least visually jarring result.

Obviously if we have `@color-profile foo { src: url(missing.icc) }` we don't really know enough about the missing profile to determine which space to choose as a fallback. A presumption based on the number of components is what I'd suggest - one component is grayscale, three is `sRGB`, four uses `device-cmyk`.

This will fail for lab profiles, and  for "exotics" with two or more than four components - which can just fall back to black as they do now. And three color spaces that are not RGB are super rare in the real world. Given we're falling back to black  now, falling back to an equally incorrect color isn't a step backwards. While testing I frequently turned whole pages black, as my missing profile meant both text _and_ background were black. Frankly anything is an improvement over that.


-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5931#issuecomment-803293425 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 20 March 2021 11:20:37 UTC