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

Feature for checking whether a color is within the visible gamut #382

Open
eeeps opened this issue Jan 3, 2024 · 2 comments
Open

Feature for checking whether a color is within the visible gamut #382

eeeps opened this issue Jan 3, 2024 · 2 comments
Labels
API change For PRs that require API design review enhancement New feature or request

Comments

@eeeps
Copy link

eeeps commented Jan 3, 2024

aka the MacAdam Limit https://en.wikipedia.org/wiki/Gamut#Surfaces

My use case is visualizing the visible gamut, but I suspect there are others (e.g., alerting CSS authors that a color is not only outside common display gamuts, but imaginary).

@LeaVerou LeaVerou added enhancement New feature or request API change For PRs that require API design review labels Feb 9, 2024
@LeaVerou
Copy link
Member

LeaVerou commented Feb 9, 2024

In terms of API, inGamut() already accepts strings for color space ids, we could also accept something like "spectral locus" if we want to be fancy or something simpler like "human" (my preference).

Not sure if we syntactically need to distinguish these special keywords from color space ids (e.g. special:human instead of just human). How likely are we to have many of them? I remember another gamut-only thing in #317. If we already have two, this makes me lean towards prefixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change For PRs that require API design review enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants