Colour mixer — blend two colours in sRGB, OKLab, OKLCH and more

Pick two colours and how much of the second you want, and the mixer gives the blended colour in HEX, RGB, HSL and OKLCH, with quarter steps and ready-to-paste CSS.

Live demo · real result from this tool
sRGB matches how most tools mix; OKLab blends evenly to the eye but still greys out opposite colours; OKLCH keeps the colour by going round the hue wheel.
Mixed colour#9ba786
RGB
rgb(155, 167, 134)
HSL
hsl(82.4, 16%, 58.9%)
OKLCH
oklch(70.93% 0.0492 124.28)

Colours

Quarter steps

CSS

color: #9ba786;/* or let the browser mix it: */color: color-mix(in srgb, #3b82f6, #facc15 50%);

Processed on your device — nothing is uploaded.

How to use the colour mixer

  1. Choose the First colour and the Second colour. HEX, rgb(), hsl(), oklch() and CSS names all work.
  2. Drag Amount of second colour to set the mix, from 0% to 100%.
  3. Pick a space under Mix in: sRGB, Linear sRGB, OKLab, OKLCH, CIE Lab, CIE LCH, HSL or HWB.
  4. Read the Mixed colour with its RGB, HSL and OKLCH values, and look at the quarter steps (0%, 25%, 50%, 75%, 100%).
  5. Copy the CSS. Use the swap button to reverse which colour is first.

What it does and when to use it

The mixer finds the colour that sits a chosen distance between two others. Designers use it to make a hover colour by mixing a brand colour with a little black, to find a middle shade between two brand colours, or to test how a color-mix() rule will look before writing it.

The space you mix in changes the answer a lot, which is the main reason to use this tool rather than guess. For a whole run of steps between colours, the gradient generator is quicker. To lay one colour over another with transparency, use the alpha blend calculator. For the exact color-mix() syntax with both percentages, try the CSS color-mix() generator.

How it works

Both colours are converted into the chosen space, and each coordinate is interpolated: result = first + (second − first) × amount. Alpha is premultiplied, as CSS does. In the polar spaces (OKLCH, LCH, HSL, HWB) hue is interpolated along the shorter arc of the colour wheel, and a grey end borrows the other colour’s hue so the mix does not swing through an unrelated colour.

The result is converted back to sRGB. If it is out of gamut it is brought inside by reducing OKLCH chroma until the change is no longer visible, the gamut-mapping method in CSS Color Module Level 4.

Worked examples

These are the mixer’s own results.

Red and blue, 50% in sRGB. The result is #800080, rgb(128, 0, 128). The quarter steps are #ff0000, #bf0040, #800080, #4000bf, #0000ff.

Blue #3b82f6 and yellow #facc15, 50%. The space decides the outcome:

Mix in Result
sRGB #9ba786 (olive grey)
OKLab #9db0b0 (grey teal)
OKLCH #00cba7 (teal green)

White and black, 50%. sRGB gives #808080. Linear sRGB gives #bcbcbc, because it averages light energy rather than encoded values.

Limits and tips

  • This is light mixing, not paint or ink mixing. No setting predicts how two pigments combine.
  • Only two colours at a time. Mix the result again with a third if you need to.
  • Hue direction is always the shorter arc here. For longer or increasing hue paths, use the CSS color-mix() generator.
  • The work happens in your browser; colours are not uploaded.

Frequently asked questions

Why do blue and yellow not make green here?
Paint mixes by absorbing light; screens mix by adding it. In sRGB the halfway point between
Which mixing space should I pick?
sRGB matches most design tools and older CSS. OKLCH keeps colours vivid between distant hues. OKLab and Lab give even lightness steps but can pass through grey between opposite colours. Linear sRGB behaves like real light, so black and white meet at a lighter grey.
What does "Amount of second colour" mean?
It is how far the result sits from the first colour toward the second. 0% returns the first colour, 100% the second, and 25% is one quarter of the way.
Can I let the browser do the mixing?
Yes. The CSS box shows a color-mix() line in the space you chose, under a plain HEX line you can keep as a fallback for older browsers.
What happens if a mix falls outside sRGB?
Some OKLCH and LCH mixes are more vivid than a normal screen can show. The result is gamut-mapped by lowering chroma, as CSS Color 4 describes, so the HEX value is always displayable.

Sources

  1. CSS Color Module Level 5 — color-mix() — W3C, accessed 2026-10-08

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close