Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve color naming thresholds #6210

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Improve color naming thresholds #6210

merged 1 commit into from
Apr 17, 2024

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Apr 16, 2024

@majornista pointed out that yellow #ffff00 is described as "very light vibrant yellow green". I realized why this was the case: at lower lightness values, yellow tends to shift toward green. For example, both yellow (#ffff00) and olive (#808000) have the same hue, but olive appears more green. This is a similar effect to what happens between orange and brown. I've fixed this by adjusting the threshold for green to be a bit later, and added a lightness threshold for the green shift similar to what we have for orange/brown.

Also added some additional tests based on CSS named color keywords.

@rspbot
Copy link

rspbot commented Apr 16, 2024

@rspbot
Copy link

rspbot commented Apr 16, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

@majornista majornista self-requested a review April 16, 2024 21:32
@devongovett devongovett merged commit 64ed130 into main Apr 17, 2024
25 checks passed
@devongovett devongovett deleted the color-name-improvements branch April 17, 2024 16:33
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.

None yet

4 participants