Give it a base hex, then add a ColorScaleStep for each step people copy. With no children, it shows all 11 steps.
chart-colors.tsx
ColorScale
<fieldset>| Prop | Type | Default | Description |
|---|---|---|---|
| base | string | — | The base color as hex: the scale makes its 11 steps (colorScale) and marks the closest one. |
| steps | — | Your own steps, in place of the made ones. With base, the step nearest it gets the dot. | |
| layout | "row""strip" | "row" | row (default): 56px tiles, the step and hex under each. strip: one 32px bar of buttons. |
| on | — | Runs after a step copies its hex, with the step and its hex. | |
| labels | — | The words (COLOR_SCALE_LABELS), to translate them. Keep the object stable. | |
| ...props | <fieldset> attributes | — | Every other attribute goes to the <fieldset>, with a ref. |
ColorScaleStep
<button>| Prop | Type | Default | Description |
|---|---|---|---|
| step | number | — | The step to show and copy (500): one of the steps of the root. |
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. |
| Tab | Moves to the next step. |
|---|---|
| EnterorSpace | Copies the hex of the step. |
Built with
Installs with Color Scale
- Components
- Dot











