How to make an accessible color scale
- Enter a color such as
#2A6DF4and choose a concise name, for examplebrand. - Choose OKLCH to vary perceived lightness, or HSL for traditional HSL-based shades. Select Preserve original when your base HEX must remain unchanged.
- Inspect the eleven shades, open the WCAG table, then copy CSS or Tailwind configuration or download a Design Tokens file. Check each shade in the actual interface.
For the scale named brand, CSS uses var(--color-brand-500). Tailwind v3 expects configuration in theme.extend.colors, whereas Tailwind v4 uses @theme inside a CSS file processed by Tailwind.
HSL versus OKLCH
HSL keeps hue and saturation while varying lightness at fixed levels. The OKLCH path uses perceived lightness and reduces chroma for values outside the sRGB gamut. The generated shades are starting points and do not reproduce Tailwind's curated palette. Preserving a base color inserts its exact HEX at the nearest matching step.
Use the Contrast Checker to inspect real foreground/background combinations, the Palette Generator to create coordinated palettes, and the Color Blindness Simulator to identify possible categorical-color confusion.