Calm motion: animations on this site only fade, with no movement
Palette viewer
The shades of each color, with the value, a copy button, and the contrast
Shows a palette on a design page, so a designer can see each shade, copy its value, and know if it reads well on white or black. For two colors only, use the contrast checker.
Basic
Megumi pink
#fdf0f41.1 on white18.9 on black AA#fad6e11.3 on white15.7 on black AA#f08aa82.3 on white8.9 on black AA#d24b734.2 on white4.9 on black AA#9c23487.6 on white AA2.7 on black#5a102913.6 on white AA1.5 on black
Gray
#f6f6f71.0 on white19.4 on black AA#e7e8ea1.2 on white17.1 on black AA#b8bbc11.9 on white10.9 on black AA#767b844.2 on white4.9 on black AA#43474e9.3 on white AA2.2 on black#1d1f2316.5 on white AA1.2 on black
palettesis a list of palettes. Each palette has anameand a list ofshades, each with alabelsuch as500and a hexvalue.- Each shade shows its label on the swatch, in black or white, whichever reads better. Under it are the value and the contrast ratio on white and on black. "AA" marks a ratio of 4.5:1 or more.
- A click on a swatch copies its value. A hidden status line says "copied", and the swatch shows a check for a moment.
- Each swatch is a button named by the palette, the shade, and the value. Change the words with
labelsor a label pack:onWhite,onBlack, and the functionscopyandcopied.
Usage
ts
import { BlessPaletteViewer } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
palettes* | BlessColorPalette[] | — | |
labels | Partial<{ copy: (value: string) => string; copied: (value: string) => string; onWhite: string; onBlack: string; }> | — |