w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 664 forks source link

[css-color] limits to specific color spaces and/or color notations #10035

Open svgeesus opened 8 months ago

svgeesus commented 8 months ago

I would prefer a normative solution to the problem of handling "extreme" colors produced by oklab and oklch (e.g, the ones from https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-1929679581), which gets us to "some very wide gamut".

The value as mentioned in that comment can be expressed in many different ways.

https://colorjs.io/apps/convert/?color=oklch(90%25%2090%25%200deg)&precision=4

For example with hwb(329.3 10.37% -52.94%) or lab(83.87 115.6 1.847).

Implementing gamut mapping only for oklab, oklch would be highly problematic.

I immediately think of these :

How are these affected when gamut mapping is limited to oklch and oklab notations?


Edit:

For me personally it is also a bit a side-track :) I keep stumbling over this because I think it is important. But it isn't directly related to this issue.

Discussing limits to specific color spaces and/or color notations should be a separate issue.

Originally posted by @romainmenke in https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-1978878975

svgeesus commented 8 months ago

Discussing limits to specific color spaces and/or color notations should be a separate issue.

Agreed, hence this issue.