Tint and shade generator

Type a color to get its color tints (mixed with white), shades (mixed with black) and tones (mixed with gray) from 0% to 100% in even steps. Each swatch has its HEX code, its contrast with white and black, and the CSS color-mix() that makes it.

Step
Mix in

Tints mixed with white

Shades mixed with black

Tones mixed with gray #808080

The percentage is how much white, black or gray is mixed in. AA means the swatch reaches 4.5:1 against white (W) or black (B), the WCAG minimum for normal text.

Copy all


How to use the tint and shade generator

  1. Type a color in the Color box (HEX, rgb(), hsl(), oklch() or a CSS name such as royalblue), or click the swatch to pick one.
  2. Choose a Step: 5%, 10%, 20% or 25%. Each row runs from 0% (your color) to 100% (white, black or gray).
  3. Choose where to Mix in: sRGB for the classic mix that color-mix(in srgb, ...) gives, or OKLab for more even-looking steps.
  4. Read each swatch: its percentage, HEX code, the better text color on it, and its contrast with white (W) and black (B). Tick Show RGB and HSL values for more formats.
  5. Click HEX or CSS on a swatch to copy it, or use Copy all for CSS custom properties, SCSS variables, JSON or a plain list.
  6. Share the page address: it holds the color and settings.

What tints, shades and tones are

In the usual color theory sense, a tint is a color mixed with white, a shade is a color mixed with black, and a tone is a color mixed with gray. Definitions vary. Some sources use "tone" for any muted color, and in everyday use "shade" often means any step of a color scale, lighter or darker. This tool uses the three mixing definitions and says exactly what it mixes with: white #FFFFFF, black #000000 and the CSS color gray, #808080, in both mixing modes.

How the tool computes them

"Tint 30%" is color-mix(in srgb, #4169e1 70%, white), which for royal blue gives #7A96EA; every swatch is a CSS color-mix() like this (the color mixer explains the percentages in full). For opaque colors the result matches the browser's color-mix() result, rounded to HEX; for results outside sRGB, browsers may clip where this tool gamut-maps, which changes the HEX only for strongly out-of-gamut mixes. Transparency in the input is ignored.

In sRGB mode each red, green and blue value moves toward the target in a straight line: a 30% tint of a channel c (0 to 255) is c + 0.3 × (255 − c), and a 30% shade is 0.7 × c. These are the ordinary, gamma-encoded sRGB numbers, the same ones in a HEX code; CSS has a separate srgb-linear space for mixing in linear light. In OKLab mode the tool converts both colors to OKLab, moves lightness and the two color axes the same way, and converts back. If a result falls just outside what sRGB can show, it is mapped into range the CSS Color 4 way. Each swatch's label uses whichever of white or black text has the higher WCAG contrast.

sRGB vs OKLab: a worked example

For CSS blue, #0000FF, at 10% steps the tool gives these tints. L is OKLab lightness (0 to 100) and H is OKLCH hue:

WhitesRGBLHOKLabLH
0%#0000FF45.2264.1°#0000FF45.2264.1°
10%#1A1AFF46.7266.3°#0541FF50.3264.0°
20%#3333FF49.7269.8°#2260FF55.7263.8°
30%#4D4DFF54.4273.9°#3E78FF61.0263.8°
40%#6666FF59.8277.4°#598EFF66.5263.4°
50%#8080FF66.1280.1°#74A3FF72.2262.8°
60%#9999FF72.6282.1°#8FB6FF77.6262.4°
70%#B3B3FF79.5283.7°#AAC9FF83.2261.4°
80%#CCCCFF86.2284.8°#C6DBFF88.7261.2°
90%#E6E6FF93.2285.7°#E2EDFF94.3260.3°
100%#FFFFFF100.0–#FFFFFF100.0–

Three things stand out:

Shades show the same pattern in the other direction. The sRGB steps range from 0.041 to 0.117, mostly growing, with the largest jump in the last step, from #000019 to black; the OKLab steps stay between 0.053 and 0.057. The 50% sRGB shade of blue, #000080, rounds to #000080, the CSS color navy (127.5 rounds to 128).

BlacksRGBLOKLabL
0%#0000FF45.2#0000FF45.2
10%#0000E641.8#0000DE40.7
20%#0000CC38.2#0000BE36.2
30%#0000B334.7#00009E31.6
40%#00009930.9#00008027.1
50%#00008027.1#00006322.6
60%#00006623.1#00004818.2
70%#00004D19.0#00002E13.6
80%#00003314.5#0000169.0
90%#0000199.6#0000034.4
100%#0000000.0#0000000.0

Neither is wrong. sRGB matches the classic Sass mix() (without $method) and color-mix(in srgb, ...), so its numbers match existing Sass and CSS code. OKLab gives more even, hue-stable steps; for many colors the two are much closer (royal blue's 50% tints are #A0B4F0 in sRGB and #9CB6F4 in OKLab).

Shades and tints in CSS with color-mix()

color-mix() lets the browser compute each step from one variable, so changing the base color updates every tint and shade:

:root {
  --brand: #4169e1;
  --brand-tint-30: color-mix(in srgb, var(--brand) 70%, white);
  --brand-shade-20: color-mix(in srgb, var(--brand) 80%, black);
  --brand-tone-40: color-mix(in oklab, var(--brand) 60%, gray);
}

Write in srgb or in oklab to match the mode you picked here; CSS Color 5 now makes the color space optional, with oklab as the default, but browsers that shipped color-mix() before that change need it, so keep writing it. In Sass, the classic mix($color1, $color2, $weight) (without $method) uses the weight as the share of the first color, so mix($brand, white, 70%) is 70% of your color and 30% white, the same as the "Tint 30%" swatch in sRGB mode. Choose CSS custom properties (color-mix) under Copy all to get every step written this way, or the HEX formats for fixed values.

Shades and tints vs a Tailwind color scale

This tool makes simple, even mixes with white, black and gray: every step is the same percentage apart, and 100% is always pure white, black or gray. A Tailwind-style scale from 50 to 950 is designed instead: its 11 stops follow a lightness curve, keep some color at the ends (950 is not black) and adjust chroma along the way. For that kind of scale, use the Tailwind color generator. The hex color pages show such a scale for 20 common colors.

Common mistakes

To fine-tune a single swatch, open it in the color picker, or convert it to other formats in the color converter.

Key terms

Tint
A lighter version of a color, traditionally made by mixing it with white. The lighter steps of a color scale, such as Tailwind's 50 to 300, are also loosely called tints.
Shade
A darker version of a color, traditionally made by mixing it with black. In everyday use, "shade" often means any step of a color scale, lighter or darker.
Tone
A color mixed with gray, which makes it less saturated. Some sources use the word more loosely for any muted version of a color; this tool mixes with the CSS color gray, #808080.
deltaE OK
The straight-line distance between two colors in OKLab. A value of 0 means identical. CSS Color 4 uses it for gamut mapping and treats 0.02 as a just-noticeable difference.
Gamma encoding
The nonlinear curve that sRGB applies to light values before storing them, so the 0 to 255 numbers in a HEX code are not proportional to the amount of light. Mixing these numbers directly, as color-mix(in srgb) does, is not the same as mixing light.

Frequently asked questions

What is the difference between a tint and a shade?
A tint is a color mixed with white, so it is lighter; a shade is a color mixed with black, so it is darker. A tone is a color mixed with gray.
Does a 20% tint mean 20% white?
Yes. The percentage is the share of white, black or gray, so a 20% tint is color-mix(in srgb, your-color 80%, white). For blue it is #3333FF.
Is Sass lighten() the same as a tint?
No. Sass's deprecated lighten() (now color.adjust($color, $lightness: 20%)) adds 20 points of HSL lightness rather than mixing in 20% white. For blue that gives hsl(240 100% 70%), #6666FF, which is the 40% tint.
Why are the darkest OKLab shades almost black?
OKLab mode lowers lightness in equal steps, and colors below about 10 OKLab lightness are very dark: blue's 80% and 90% OKLab shades are #000016 and #000003. sRGB mode keeps more of the color in its darkest steps.

Sources: CSS Color 5: color-mix(), CSS Color 4: color interpolation, CSS Color 4: OKLab and OKLCH, CSS Color 4: gamut mapping, MDN: color-mix(), Sass: sass:color (mix; deprecated lighten), WCAG 2.2: Contrast (Minimum), A perceptual color space for image processing (Björn Ottosson). Last checked 2026-11-17.