Skip to content
Jellykit

Color Mixer

Mix two to four colors in any amounts in sRGB, linear sRGB, OKLab, OKLCH, CIELAB or LCH, with a stepped scale between them.

  • Runs on your device
Loading tool

About Color Mixer

Pick up to four colors, set how much of each goes in, and choose the color space to mix in. The space matters: red and blue mixed in plain sRGB give a dull purple, while OKLab keeps the middle as bright as the ends, and OKLCH and LCH travel around the hue circle instead of cutting across it.

You get the mixed color as HEX, RGB, HSL and OKLCH, the matching CSS color-mix() expression where CSS can write it, and a scale of evenly spaced steps from the first color to the last that you can copy straight into a palette.

How it works

  1. Each color is converted into the chosen space, and the mix is the weighted mean of its channels. Amounts are relative, so 1 and 3 give the same mix as 25% and 75%.
  2. In OKLCH and LCH the hue is averaged the short way round the color wheel, as CSS color-mix() does, and a gray has no hue, so mixing with gray keeps the other color hue.
  3. A mix that falls outside what an sRGB screen can show is brought back in by lowering its chroma in OKLCH, keeping its lightness and hue, and the result says when this happened.
  4. The scale places evenly spaced steps along the path from the first color through the others to the last, mixing each neighbouring pair in the same space.

Questions

Which color space should I mix in?

OKLab for most work: it mixes the way people see color, so midpoints are neither muddy nor too dark. Use sRGB to match what older design tools and plain CSS gradients do, linear sRGB to match how light actually adds up, and OKLCH or LCH when you want vivid midpoints that keep their saturation.

Is the result the same as CSS color-mix()?

For two colors, yes: the tool writes the matching color-mix() expression, with the amounts turned into percentages that add up to 100. With three or four colors it nests color-mix() in the rectangular spaces; in OKLCH and LCH CSS would blend pair by pair and give a different hue, so no expression is offered there.

Why does the mix sometimes say it was brought into range?

Averaging in LCH or OKLCH can produce a color more saturated than an sRGB screen can show. The tool then gives the nearest displayable color with the same lightness and hue, and says so.

Can I mix more than four colors?

Not at once. Mix four, then use the result as one of the colors of the next mix, keeping the amounts in proportion.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.