Skip to content

fix(color-contrast): support CSS 4 color spaces#4020

Merged
WilcoFiers merged 4 commits intodevelopfrom
color-space
May 15, 2023
Merged

fix(color-contrast): support CSS 4 color spaces#4020
WilcoFiers merged 4 commits intodevelopfrom
color-space

Conversation

@straker
Copy link
Copy Markdown
Contributor

@straker straker commented May 12, 2023

Adds support for hwb(), lab(), lch(), oklab(), and oklch() color spaces

Closes: #4007

@straker straker requested a review from a team as a code owner May 12, 2023 15:16
@straker straker changed the title fix(color-contrast): support css 4 color spaces fix(color-contrast): support CSS 4 color spaces May 12, 2023
assert.equal(c.blue, 200);
assert.equal(c.alpha, 1);
});
it.skip('allows exponent numbers', () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colorjs doesn't handle this, but we decided that's ok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should open an issue for this with colorjs.

Sandrakay49

This comment was marked as spam.

@WilcoFiers WilcoFiers requested a review from Sandrakay49 May 15, 2023 09:09
it('allows oklab', () => {
const c = new Color();
c.parseColorFnString('oklab(0.697 -0.107 0.023)');
assert.equal(c.red, 77);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, chrome devtools gives me 76 for this. 🤷

@ljharb
Copy link
Copy Markdown
Contributor

ljharb commented Aug 14, 2023

Caused #4127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Axe fails with new color spec

4 participants