Color Shade Generator

: Build an eleven-step shade and tint scale from one color and copy it as CSS variables
Colour
Hex, rgb() or rgba(), hsl() or hsla(), oklch(), or a CSS colour name
Scale

Shades 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

Nearest step 500

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.

  1. 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). Examples also loads one.
  2. Read the ramp under Shades and tints in the Scale pane. The outlined swatch is the step closest to your colour's lightness; it says Nearest to your colour, and the line under the pane names it.
  3. Press a swatch to copy that step's hex.
  4. Set CSS prefix and press Copy scale (or the pane's Copy all) for the whole ramp, exactly as CSS custom properties shows it; Download saves it as a .css file.

A blue with css prefix set to brand. The nearest step is close to the input but not the same colour.

Input
color: #3b82f6
css prefix: brand
Output
nearest 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;

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.