Skip to main content

Color Palette Generator

Build lockable harmony palettes, OKLCH tonal scales and design tokens

Palette Generation

Palette Colors

  • Mapped to sRGB by reducing chroma.

Color 1

HEX
#6366F1
RGB
rgb(99 102 241)
HSL
hsl(238.732 83.529% 66.667%)
OKLCH
oklch(58.54% 0.2041 277.117)

Tints

  • #767FF5
  • #8B96F8
  • #A1ADFA
  • #B9C2FC
  • #D1D8FD

Shades

  • #5154C6
  • #40439D
  • #303376
  • #202351
  • #12142E

Accessibility

Fail means this foreground and background pair is below the selected WCAG text threshold, not that palette generation failed. Normal text: AA 4.5:1; AAA 7:1.

Best text is black or white, whichever contrasts more with the color.

Text Color (Normal Text)
ColorBest Textvs Blackvs WhiteAAAAA
1#6366F1Black4.70:14.47:1PassFail
2#3C69C0White3.97:15.28:1PassFail
3#8F72EABlack5.76:13.64:1PassFail
4#0063A3White3.31:16.34:1PassFail
5#B27FE0Black7.01:12.99:1PassPass

Export & Integration

Colors in Export: 5 (Regular Palette)

:root {
  --primary-1: #6366F1;
  --primary-2: #3C69C0;
  --primary-3: #8F72EA;
  --primary-4: #0063A3;
  --primary-5: #B27FE0;
}

Integration

Gradient selection: 0 / 6

Select 2–6 colors in your desired order. No colors are silently truncated.

Advanced

Color Palette Generator

Generate editable, lockable color systems with perceptual OKLCH tones and usable design tokens.

Options

Choose a seed or random workflow, inspect/edit colors and lock the ones to preserve before Shuffle. Harmony groups generate perceptual hue offsets; manual locks can override them. Tonal Scale preserves the regular palette and produces exactly 50–950. Its fixed lightness targets need not place the seed at 500. Inspect tints/shades and four formats, review contrast, then copy or download one of five token formats.

Contrast

Source alpha is retained; contrast composites background then foreground over the chosen opaque backdrop. Results describe pairs, not accessibility certification. Eleven-tone imports must descend in lightness. Color data stays local; browser storage is optional. Select 2–6 colors explicitly for a locale-aware gradient handoff. Reset and imports can be undone.

Frequently asked questions
Do locked colors change when I shuffle?
No. Locked colors keep their exact value, alpha and position. Shuffle regenerates only the unlocked slots, and harmony or seed changes also leave locked colors untouched.
Which harmony modes are supported?
Analogous, complementary, split complementary, triadic, tetradic and monochromatic. Hue offsets are calculated in OKLCH, so each mode produces a visibly different palette structure.
How is the 50–950 tonal scale generated?
The seed color is converted to OKLCH and placed on eleven fixed lightness targets from 50 to 950. Lightness always descends from 50 to 950, and any tone outside sRGB has its chroma reduced until it fits.
Which export formats are available?
CSS custom properties, SCSS variables, a Tailwind v3 theme extension, JSON design tokens and a plain array. Exports use a sanitized namespace such as primary, so the output is always syntactically valid.

CodingTool is officially live on