color-js / color-js/elements

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

Open
#129 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
30
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.