ColorGraffle: Turn Any Color into a Tailwind CSS Shade Palette

Give it a color — hex, rgb, hsl, oklch, or a named color — and it expands each one into a full 50–950 shade scale, just like Tailwind's built-in palettes (blue-50 through blue-950), along with ready-to-paste config for Tailwind CSS v4 or UnoCSS.

Input Colors

oklch(0.3289 0.094 280.8)
midnightblue

Shade Palettes

exampleBlue
 
50
 
100
 
200
 
300
 
400
 
500
 
600
 
700
 
800
 
900
 
950
 
(default)

Tailwind CSS @theme Block

Notes

  • Color inputs accept any CSS color format — hex (#013663), rgb(), hsl(), oklch(), or a named color like rebeccapurple — everything is converted to OKLCH before the shade ramp is generated
  • Not sure what to add next? The suggestion card proposes a harmonious companion — analogous first, then complementary, split-complementary, and triadic — based on your most recent color; cycle through candidates or dismiss it
  • Each input color becomes a 12-step scale: shades 50 (lightest) through 950 (darkest), plus a DEFAULT shade set to your exact input color
  • Shades keep your color's chroma and hue and step only its lightness — because OKLCH is perceptually uniform, the resulting scale looks even and consistent, the way Tailwind's own palettes do
  • OKLCH is a great color space for web design: it is perceptually uniform and has a very wide gamut
  • Tailwind CSS v4 uses CSS-first configuration: custom colors are defined as CSS variables inside an @theme block in your stylesheet, not in a tailwind.config.js file
  • Paste the generated @theme block into the CSS file where you @import "tailwindcss", and utilities like bg-yourcolor-500 become available
  • All modern browsers now support OKLCH colors natively, so no fallbacks are needed — Tailwind v4's own default palette is defined in OKLCH
  • To replace Tailwind's default palette entirely, add --color-*: initial; at the top of your @theme block before your custom colors

More Reading

Customizing Colors in Tailwind CSSTheme Variables in Tailwind CSSOKLCH Color ConverterOKLCH in CSS: Why We Should Quit RGB and HSLThe oklch() CSS function

Credits

Björn Ottosson

This work is deeply indebted to and derivative of the work and equations by Björn Ottosson the originator of the Oklab and OKLCH color spaces. Read more about the Oklab color space from his blog link below.

A perceptual color space for image processing