Color Shade Generator
: Build an eleven-step shade and tint scale from one color and copy it as CSS variablesShades and tints
Press a step to copy its hex.
- One hue, eleven lightnesses: chroma is eased down at the ends and fitted to sRGB, so the ramp keeps its hue instead of clipping.
CSS custom properties
Color Shade Generator
Turn one brand colour into an eleven-step ramp from near-white to near-black, named 50 to 950, and paste it into a stylesheet as custom properties. The steps are computed in OKLCH, so they hold one hue from end to end.
How to generate shades and tints of a color
- Enter a colour in
Colour, use the native picker, or press the eyedropper to take a pixel from anywhere on screen (Chrome and Edge only).Examplesalso loads one. - Read the ramp under
Shades and tintsin theScalepane. The outlined swatch is the step closest to your colour's lightness; it saysNearest to your colour, and the line under the pane names it. - Press a swatch to copy that step's hex.
- Set
CSS prefixand pressCopy scale(or the pane'sCopy all) for the whole ramp, exactly asCSS custom propertiesshows it;Downloadsaves it as a .css file.
Example
A blue with css prefix set to brand. The nearest step is close to the input but not the same colour.
color: #3b82f6
css prefix: brandnearest step: 500 (#4187f9), input #3b82f6
--brand-50: #f0f6ff;
--brand-100: #deebff;
--brand-200: #c4dbff;
--brand-300: #9cc2ff;
--brand-400: #639eff;
--brand-500: #4187f9;
--brand-600: #3174e1;
--brand-700: #235fc1;
--brand-800: #174ea6;
--brand-900: #0d4192;
--brand-950: #001f55;Details
- The steps sit at fixed OKLCH lightness values, from 0.971 at
50through 0.637 at500to 0.258 at950. Only hue and chroma come from your colour. - Chroma is reduced towards the light and dark ends, then each step is fitted into sRGB by lowering chroma until it fits. Plain channel clamping would rotate the hue, turning a pale saturated blue towards cyan.
- The nearest step is chosen by lightness alone, so it marks where your colour would sit on the ramp.
- A grey input gives a grey ramp, since it has no chroma to carry.
- The copied text is one
--prefix-step: #hex;line per step, indented two spaces, with no:rootwrapper, so it pastes into whichever block you already have.
Limits
- Your exact colour is usually not in the ramp, because the stops are fixed lightness values. If you need it verbatim, replace the nearest step by hand and check the neighbours still look even.
- Alpha is ignored and a note says so when the input has it. Every step is an opaque hex.
- Output is hex only. An input outside sRGB is clipped before the ramp is built, so wide-gamut
oklch()values lose their extra chroma. CSS prefixis used as typed apart from leading dashes (--brandandbrandboth give--brand-500), and is not checked otherwise, so a space in it produces an invalid property name. An empty prefix falls back tocolor.- One ramp at a time, with no dark-mode pairing and no check that a step is readable on another; use Contrast Checker for that.
FAQ
Why isn't my color in the generated scale?
Every ramp uses the same eleven lightness values so that 500 means the same weight across all your colours. A colour rarely lands exactly on one of them, so the closest step is outlined instead.
Are these the same as Tailwind's colors?
No. The step names follow Tailwind's, and the lightness stops are of the same kind, but the values are computed from your colour. #3b82f6 is Tailwind's old blue-500, and this ramp gives #4187f9 at 500.
How do I use the scale in Tailwind CSS?
In Tailwind v4, set css prefix to color-brand and paste the result inside an @theme block. That defines --color-brand-500 and the rest, which gives you classes like bg-brand-500.
What is the difference between a shade and a tint?
A tint is lighter than the base colour and a shade is darker. Strictly they mean mixing with white or black, but here each step is computed at a target lightness instead, which is why the hue does not drift to grey on the way.
Runs entirely in your browser. Nothing is uploaded.