Color Scale Generator – HEX Shades 50–950

Generate eleven color shades from any HEX code or named CSS color. Compare HSL and OKLCH, adjust brightness, check black/white text contrast and export CSS, Tailwind v3/v4 or Design Tokens JSON.

Negative values darken shades; positive values lighten them. With Preserve original enabled, the closest shade keeps your exact input HEX.

Your 11-step color scale

Click a swatch to copy its HEX code. Each shade is generated, not copied from Tailwind's official palette.

WCAG contrast for all 11 shades · Calculating

Black and white text contrast for each shade. Normal text needs at least 4.5:1 for WCAG AA or 7:1 for AAA. This does not certify a complete user interface.

StepHEXBlack textWhite textSuggested text

The unrounded contrast ratio determines pass/fail; display values are rounded.

View and export Design Tokens

W3C-style tokens use $type and $value keys. The output includes eleven shades and semantic aliases primary, primaryHover, subtle and onPrimary. Check individual text/background combinations before using them.

How to make an accessible color scale

  1. Enter a color such as #2A6DF4 and choose a concise name, for example brand.
  2. Choose OKLCH to vary perceived lightness, or HSL for traditional HSL-based shades. Select Preserve original when your base HEX must remain unchanged.
  3. 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.