Color Shades Generator
Turn one base colour into an 11-step 50-950 tint/shade ramp, tuned in OKLCH, with contrast ratios per step and CSS, Tailwind or JSON export.
Tool guide
What this tool does
Color Shades Generator expands a single colour into the 50 to 950 step ramp popularised by Tailwind CSS, computing each step's lightness and chroma in OKLCH so the whole scale stays visually even and keeps the original hue. Step 500 is always set to your exact input colour, every swatch shows its contrast ratio against white and black, and the ramp is ready to copy as CSS variables, a Tailwind colours object or JSON.
Design systems rarely use just one shade of a colour: buttons need a hover state, backgrounds need a subtle tint, and disabled text needs something quieter than pure black. Building that full ramp by hand usually means eyeballing a dozen hex codes until they feel consistent, which rarely survives a second look.
This generator instead derives the whole 50 to 950 scale from a single lightness and chroma curve in OKLCH, so each step moves by a comparable visual amount instead of jumping unevenly. Your input colour is placed exactly at step 500, the midpoint most design systems treat as the default, and every other step is scaled from it and gamut-mapped back into sRGB so nothing clips into an unexpected hue.
How to use Color Shades Generator
- Enter your base colour, or pick it with the native colour picker.
- Scan the generated 50 to 950 ramp; step 500 is marked and matches your input exactly.
- Check the contrast figures shown under each swatch for its readability on white and black backgrounds.
- Choose an export format: CSS variables, a Tailwind colours object or JSON.
- Copy the snippet or download it as a ready-to-use file.
Tips for better results
- Steps 50 to 200 work well as subtle backgrounds and hover states behind dark text.
- Steps 700 and above are usually the only ones with enough contrast for body text on a white page.
- If the ramp looks too muted at the dark end, your input colour likely has low chroma to begin with; try a more saturated base.
- Keep the hex codes exactly as generated rather than rounding them by hand, since the whole ramp is tuned to work together.
Common use cases
- Building a full Tailwind colour scale for a new brand colour in minutes.
- Replacing a design system's grey or accent scale with one derived from a single approved colour.
- Finding a background tint and a matching dark text colour that are guaranteed to come from the same hue.
- Checking which step of an existing colour has enough contrast for accessible text before writing CSS by hand.
Common mistakes to avoid
- Picking a near-black or near-white input colour, which leaves very little room for the extreme steps to differ from the middle of the ramp.
- Assuming every step is readable as text; always check the printed contrast ratio instead of guessing from the swatch colour.
- Mixing shades from this ramp with unrelated colours picked elsewhere, which breaks the consistent lightness curve that makes the scale useful.
Frequently asked questions
Why is step 500 always the exact colour I typed?
Most Tailwind-style design systems treat 500 as the default, most-used shade of a colour, so the ramp anchors there to guarantee your brand colour is reproduced exactly rather than approximated.
How are the lighter and darker steps calculated?
Each step follows a fixed OKLCH lightness and chroma curve, shifted and scaled so step 500 lands exactly on your input colour. The result is then gamut-mapped back into sRGB so every hex code is a colour real screens can show.
What do the W and B figures under each swatch mean?
They are the WCAG contrast ratios of that swatch against pure white (W) and pure black (B), so you can tell at a glance which steps are usable as text on those backgrounds.
Can I anchor a different step to my input colour instead of 500?
This tool always anchors at 500. Use Tailwind Shade Generator if you need to pin a different step, such as 600 or 300, to the exact input colour.
Feedback & suggestions
Help us improve Color Shades Generator. We read every message.