Color Mixer

Blend colours the way you want: pick two or more, slide the ratio, and get the exact mix in HEX, RGB and HSL. Choose perceptual OKLab or saturation-keeping OKLCH mixing for clean midpoints, or sRGB to match CSS — then copy a whole scale of steps between them as CSS variables, Tailwind or JSON.

Mixing spaces compared

SpaceBest for
OKLabEven-looking blends and scales
OKLCHVivid blends between distant hues
sRGBMatching CSS gradients and color-mix(in srgb)
Linear RGBSimulating mixed light

When to use it

  1. Find the midpoint between two brand colours.
  2. Build a gradient-like scale for charts or heat maps.
  3. Get hover and disabled states by mixing with white or black.
  4. See why CSS gradients look muddy and how to fix them.

How to Use

  1. Pick colour A and colour B (add more if you like).
  2. Set the ratio and the mixing space.
  3. Copy the result or export the steps.

Features

  1. Two to six colours
  2. OKLab, OKLCH, sRGB and linear RGB mixing
  3. HEX, RGB, HSL output
  4. CSS color-mix() equivalent
  5. Step scales
  6. CSS, Tailwind, SCSS, JSON export

FAQs

What is a 50% mix of black and white?

#808080 in sRGB. In OKLab it is a darker grey that looks halfway between to the eye.

Why does my blue–yellow mix look grey?

Opposite hues meet near grey in any straight-line mix. Choose OKLCH to go round the colour wheel and keep saturation.

Can I mix more than two colours?

Yes, up to six; the slider moves along all of them in order.

How do I use this in CSS?

Copy the color-mix() expression, or export the steps as variables.

Is anything uploaded?

No, it all runs in your browser.

Technical Details

Each colour is mixed channel by channel at the chosen ratio, in one of three spaces: - **OKLab:** a perceptual colour space. Mixes are interpolated in L, a and b and converted back to sRGB, so steps look evenly spaced and avoid the dark, muddy middle of sRGB mixes. - **OKLCH:** interpolates lightness, chroma and hue, taking the shorter way round the hue wheel. Opposite colours such as blue and yellow pass through teal and green instead of grey. - **sRGB:** interpolates the gamma-encoded values directly. This matches CSS gradients and color-mix(in srgb). - **Linear RGB:** undoes the sRGB gamma first, which matches how coloured light adds up. With more than two colours, the position is spread across the segments between them. The step strip samples evenly spaced positions, ends included. Results are rounded to whole 8-bit channels and shown as HEX, RGB and HSL, with an equivalent CSS color-mix() expression for two colours.

Color Tools

Color Tools

  • Color Palette Generator
  • Color Shades & Tints Generator
  • Tailwind Color Palette Generator
  • Color Blindness Simulator
  • Color Converter
  • Contrast Checker