ARZENTIQ
DESIGN & WEB

Colour Mixer & Blend Calculator

Blend two colours at any ratio in OKLab or sRGB: the mixed hex with contrast, the matching CSS color-mix() string and a gradient table in both spaces.

The exact hex of a blend between two colours, the color-mix() line that reproduces it, and a side-by-side gradient showing where sRGB and OKLab mixing differ.

Example: Red #ff0000 and blue #0000ff at 50 % give #8c53a2 in OKLab but the dull purple #800080 in sRGB; the CSS is color-mix(in oklab, #ff0000 50%, #0000ff 50%).

v0.1.0 · last reviewed 19 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Two colours,
one honest middle.

How the blend is computed, why red and blue give a different purple depending on the space, and how to reproduce it in CSS.

The blend

The ratio is the share of colour B, exactly as CSS color-mix() reads it: 0 % is pure A, 100 % is pure B. Each channel of the chosen colour space is interpolated linearly — mix = A × (1 − t) + B × t — and the result is rounded to whole 8-bit sRGB channels. The gradient table places n stops at equal spacing from A to B and shows the sRGB and OKLab results next to each other.

Why the space matters

Averaging sRGB channel values averages gamma-encoded numbers, not light, so the middle of two saturated colours comes out darker and greyer than either end — red and blue meet at a dim #800080. OKLab (CSS Color Module Level 4) is a perceptual space in which equal numeric steps look like equal visual steps, so its midpoint keeps the expected brightness and hue. OKLab is the default here; sRGB is available for matching a blend made in an older tool. The warning appears when the two disagree by more than 0.03 in OKLCH lightness.

Contrast and the CSS line

The mixed colour is reported with its WCAG 2 contrast against white and against black, so you can tell whether it will carry text. The color-mix() string is the CSS Color 5 syntax with the same space and percentages; browsers compute the identical result. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

Last reviewed 19 September 2026. How results are checked: How we verify.