Re: [csswg-drafts] [css-color-4] matching displayed colors between CSS colors and images when those colors are outside the displayable gamut (#10055)

> Do users have the needed knobs and dials today to effectively color match between images and CSS colors?

I believe it's as simple as specifying the same color using `color(display-p3 ...)` as is used in an image or a canvas, and it will match, since browsers currently treat colors the same in all of these contexts.

I tried this with two images from https://webkit.org/blog-files/color-gamut/comparison.html, matching the bright yellow and red colors in the images with a background color like `color(display-p3 1 0 0)`. Try it at https://codepen.io/foolip/pen/WNWpZxM. Screenshot:

<img width="367" alt="image" src="https://github.com/w3c/csswg-drafts/assets/498917/4919235f-e3a4-41e6-aa50-9eeba59c5d8f">

The background will be a yellow similar to the flower, and the red will match border of the image.

Color matching in this way is a longstanding feature already.

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


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

Received on Wednesday, 20 March 2024 22:16:28 UTC