oddbird / oddcontrast

https://www.oddcontrast.com/
BSD 3-Clause "New" or "Revised" License
28 stars 1 forks source link

Add implementation warning for browsers #145

Closed jamesnw closed 9 months ago

jamesnw commented 10 months ago

Description

Fixes #95.

I ended up with the text "Browser rendering of Oklab for colors outside of the display gamut is incorrect according to the CSS specification."

The link is to Miriam's CSS WG issue.

Steps to test/reproduce

Change between formats, and see that the warning shows for all unbounded formats.

netlify[bot] commented 10 months ago

Deploy Preview for oddcontrast ready!

Name Link
Latest commit 794feaf509423fbc7462e4daece504907e7c347e
Latest deploy log https://app.netlify.com/sites/oddcontrast/deploys/6579e19f1ff78d0008f5a011
Deploy Preview https://deploy-preview-145--oddcontrast.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

svgeesus commented 10 months ago

I ended up with the text "Browser rendering of Oklab for colors outside of the display gamut is incorrect according to the CSS specification."

It isn't specific to Oklab (and Oklch) though, is it? You would get the same with CIE Lab and LCH, or color(rec2020 r g b) or indeed `color(srgb r g b) with any component values that are negative.

"Browser rendering for colors outside of the display gamut is incorrect according to the CSS specification."

seems more accurate. I'm concerned that people internalize "Oklab has problems" instead of "browsers unwisely prioritized speed over color consistency, so users have to do extra work".

jamesnw commented 10 months ago

It isn't specific to Oklab (and Oklch)

@svgeesus Good point, and my description glossed over that the message updates to match whatever space is selected. But your point still stands that it isn't something about oklab itself.

Currently it is only shown for unbounded spaces, but you bring up a fair point about the same issue for values that are out of bounds in srgb, for example.

However, our tool doesn't easily allow the creation of out of bounds values in sRGB, but in the unbounded spaces, it is quite easy to make a color that isn't displayed properly.

My proposal-

jamesnw commented 10 months ago

In grooming today, we decided to remove the banner from the top, and instead add more context to the known color issues panel.

jamesnw commented 10 months ago

This is now moved to the Known Issues section. The known issue in #146 speaks to browser implementation with clipping. This known issue talks about how the new features now allow creation of out of gamut colors, common ways to make those colors, and why to avoid it.