Tints and Shades Generator
Generate tints and shades of any color in 5, 10, 20 or 25 % steps, mixed in OKLCH or sRGB, and export them as CSS variables or a Tailwind config.
Tints (mixed with white)
Shades (mixed with black)
How to use the tints and shades generator
- Choose a Base color with the swatch, or type a value in Color code:
#1E90FF,rgb(30 144 255),hsl(210 100% 56%)or a CSS name such asteal. - Pick a Step: 5 %, 10 %, 20 % or 25 %. With 10 %, you get tints at 10 %, 20 % … 100 % and the same number of shades.
- Choose how to Mix in: OKLCH (perceptual) or sRGB (classic). The two rows update at once: Tints (mixed with white) and Shades (mixed with black), each starting from the base.
- Click Copy under any swatch to copy its HEX code.
- Under Export as, choose CSS variables, Tailwind config (v3), Tailwind @theme (v4), SCSS variables or JSON, set a Name such as
primaryorbrand, then Copy or Download the code.
Tints, shades and tones
In color theory, a tint is a color mixed with white, a shade is a color mixed with black, and a tone is a color mixed with grey. The percentage says how much white or black is added: a 30 % tint is 70 % base color and 30 % white. At 100 % you reach pure white or pure black, which is why the last swatch of each row is always #FFFFFF or #000000; it marks the end of the scale.
Tints and shades are the quickest way to build a consistent scale from a single brand color: light backgrounds and hover states from the tints, borders, pressed states and dark text from the shades.
OKLCH or sRGB mixing?
sRGB (classic) mixes the red, green and blue values directly. It is what most older generators do and matches CSS color-mix(in srgb, …). The formula for a tint is simply channel + (255 − channel) × p, and for a shade channel × (1 − p). It is predictable, but the steps are not perceptually even: blues tend to drift toward purple as they lighten, and dark shades often look muddy.
OKLCH (perceptual) mixes in the OKLCH color space designed by Björn Ottosson in 2020, like CSS color-mix(in oklch, …). Lightness, chroma and hue are interpolated separately. White and black have no hue, so the base hue is kept all the way, and each step changes lightness by a visually similar amount. Colors that would fall outside the sRGB gamut are brought back by reducing chroma, not by clipping channels, so the hue stays stable. For design systems, this usually gives cleaner and more even scales.
Using the export
- CSS variables produce a
:rootblock such as--primary-tint-20and--primary-shade-40, ready to paste into a stylesheet. - Tailwind config (v3) gives a
colorsobject fortheme.extend.colors; you then write classes likebg-primary-tint-20ortext-primary-shade-60.DEFAULTholds the base, sobg-primaryworks too. - Tailwind @theme (v4) gives
--color-…variables for the CSS-first configuration of Tailwind 4. - SCSS variables and JSON suit other build tools and design tokens.
Names are lowercased and spaces become hyphens, so “Brand Blue” becomes brand-blue.
Frequently asked questions
What is the difference between a tint and a shade?
A tint adds white and makes the color lighter; a shade adds black and makes it darker. Adding grey gives a tone, which lowers saturation without changing lightness much.
Which step should I choose?
10 % gives nine usable steps on each side, enough for most interfaces. Use 20 % or 25 % for a short scale in a presentation, and 5 % when you need very fine hover or border variations.
Why do my sRGB tints look purple?
Mixing blue with white in sRGB shifts the perceived hue toward violet (a known effect of the sRGB space). Switch to OKLCH (perceptual) to keep the hue steady.
Are these colors accessible?
The generator does not check contrast. Test the pairs you plan to use, such as text on a light tint, with a contrast checker: WCAG requires 4.5:1 for normal text.
Can I use the output with Tailwind's 50–950 scale?
The export uses percentage names (tint-10, shade-30) so the meaning stays clear. If you prefer numbered keys, rename a few steps in the exported code, for example the 90 % tint as 50 and the 80 % shade as 950.
Related tools
- Color Palette Generator Generate color palettes from one base color using color harmony rules - complementary, analogous, triadic, tetradic, square and monochromatic.
- Color Picker Free online color picker. Choose any color and instantly copy its HEX, RGB, HSL, HSV and CMYK codes, with contrast ratios against white and black.
- Contrast Checker Free WCAG contrast checker. Enter a text and background color to get the contrast ratio, AA/AAA results and the nearest passing color.