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

[color-scale] Highlight min/max of certain coordinate #129

Open
LeaVerou opened this issue Oct 16, 2024 · 0 comments
Open

[color-scale] Highlight min/max of certain coordinate #129

LeaVerou opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@LeaVerou
Copy link
Member

It would be really useful with both charts and scales is a way to style the accent color differently, i.e. the one with peak chroma. Obviously we'd want something more generic than that, e.g. a way to highlight the min and max for any coord or even for deltas/contrasts.

So it would have the same syntax as the value part of the info attribute. Maybe it could even piggyback on it, e.g. info="L: oklch.l, C: oklch.c (max: accent), H: oklch,h" which would add accent to that swatch's part so it can be styled via ::part(accent). Both min and max would be able to be specified, in any order (e.g. info="L: oklch.l (min: darkest, max: lightest), C: oklch.c (max: accent), H: oklch,h")

I really like this, actually. it's nice, short, and readable for the common case, but allows pretty complex things to be specified as well.

@LeaVerou LeaVerou added the enhancement New feature or request label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant