Skip to content

Conversation

@dbaron
Copy link
Member

@dbaron dbaron commented Jun 24, 2020

The main bug was reported both in a comment in the spec and in
w3ctag/design-reviews#526 (comment)

This also fixes dropping of a "9" digit in the red's chroma midway
through the calculations.

Note that the correct intermediate is well out of sRGB. I just chose to
use it anyway and add a note about such cases.

The main bug was reported both in a comment in the spec and in
w3ctag/design-reviews#526 (comment)

This also fixes dropping of a "9" digit in the red's chroma midway
through the calculations.

Note that the correct intermediate is well out of sRGB.  I just chose to
use it anyway and add a note about such cases.
@dbaron dbaron added the css-color-5 Color modification label Jun 24, 2020
@dbaron dbaron requested a review from svgeesus June 24, 2020 22:57
@dbaron
Copy link
Member Author

dbaron commented Jun 24, 2020

Though it occurs to me that my "some of the intermediate colors" note might be wrong because it seems likely to be all of the intermediate colors.

@dbaron
Copy link
Member Author

dbaron commented Jun 24, 2020

Though I guess this is inconsistent with the handling of out-of-gamut colors in example 8.

@LeaVerou
Copy link
Member

LeaVerou commented Jun 25, 2020

We should either do gamut mapping for --color or not show anything. We definitely don't want to do clipping, which is what browsers do if you throw negative coords at them.
Also, it appears that there is another problem with this example, but I'll open a new issue for that.

@dbaron
Copy link
Member Author

dbaron commented Jun 25, 2020

I changed it to an entirely different example that doesn't go out of gamut (by using colors at the endpoints that are both darker and mix sRGB primaries, although in hindsight I may have only needed the latter difference).

@svgeesus svgeesus merged commit 383746e into w3c:master Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css-color-5 Color modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants