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:
| White | sRGB | L | H | OKLab | L | H |
|---|---|---|---|---|---|---|
| 0% | #0000FF | 45.2 | 264.1° | #0000FF | 45.2 | 264.1° |
| 10% | #1A1AFF | 46.7 | 266.3° | #0541FF | 50.3 | 264.0° |
| 20% | #3333FF | 49.7 | 269.8° | #2260FF | 55.7 | 263.8° |
| 30% | #4D4DFF | 54.4 | 273.9° | #3E78FF | 61.0 | 263.8° |
| 40% | #6666FF | 59.8 | 277.4° | #598EFF | 66.5 | 263.4° |
| 50% | #8080FF | 66.1 | 280.1° | #74A3FF | 72.2 | 262.8° |
| 60% | #9999FF | 72.6 | 282.1° | #8FB6FF | 77.6 | 262.4° |
| 70% | #B3B3FF | 79.5 | 283.7° | #AAC9FF | 83.2 | 261.4° |
| 80% | #CCCCFF | 86.2 | 284.8° | #C6DBFF | 88.7 | 261.2° |
| 90% | #E6E6FF | 93.2 | 285.7° | #E2EDFF | 94.3 | 260.3° |
| 100% | #FFFFFF | 100.0 | – | #FFFFFF | 100.0 | – |
Three things stand out:
- Lightness. The 50% sRGB tint,
#8080FF, has a lightness of 66.1. Halfway between blue (45.2) and white (100) is 72.6, so a 50% sRGB tint is not halfway in lightness. The 50% OKLab tint,#74A3FF, is at 72.2. - Even steps. Measured in deltaE OK, the sRGB tint steps range from 0.022 to 0.079, so the first step (to
#1A1AFF) is under a third of the largest step (0.079) and close to the 0.02 just-noticeable difference. The OKLab steps all fall between 0.061 and 0.065. - Hue. The sRGB tints move from 264.1° to 285.7° in OKLCH hue, a shift of 21.6° toward purple. The OKLab tints stay between 260.3° and 264.1°. All nine mixed OKLab tints are very slightly outside sRGB; for these, gamut mapping and simple clipping give the same HEX codes.
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).
| Black | sRGB | L | OKLab | L |
|---|---|---|---|---|
| 0% | #0000FF | 45.2 | #0000FF | 45.2 |
| 10% | #0000E6 | 41.8 | #0000DE | 40.7 |
| 20% | #0000CC | 38.2 | #0000BE | 36.2 |
| 30% | #0000B3 | 34.7 | #00009E | 31.6 |
| 40% | #000099 | 30.9 | #000080 | 27.1 |
| 50% | #000080 | 27.1 | #000063 | 22.6 |
| 60% | #000066 | 23.1 | #000048 | 18.2 |
| 70% | #00004D | 19.0 | #00002E | 13.6 |
| 80% | #000033 | 14.5 | #000016 | 9.0 |
| 90% | #000019 | 9.6 | #000003 | 4.4 |
| 100% | #000000 | 0.0 | #000000 | 0.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
- Expecting HSL lightness to avoid the hue shift. For a color at 50% HSL lightness or above, raising HSL lightness gives the same colors as an sRGB mix with white (and lowering it from 50% or below equals mixing with black), hue drift included.
- Forgetting that tones change lightness. Gray
#808080has an OKLab lightness of 60.0, so tones of a dark color get lighter as well as grayer: navy's 50% tone is#404080. - Putting text on a swatch without checking contrast. The W and B ratios on each swatch tell you whether white or black text reaches 4.5:1; check other pairs in the contrast checker.
To fine-tune a single swatch, open it in the color picker, or convert it to other formats in the color converter.