Skip to main content

Free Color Mixer – Blend Colors in sRGB, Linear & Lab

Color Mixer blends two or more colors at any ratio and shows the result in sRGB, linear RGB and Lab online for free. Live gradient and copy-ready CSS in your browser.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

3 mixing spacesMulti-colourRatio sliderGradient stripFree
%
%

Gradient between inputs

#808080

Naive sRGB

Averaging the 0–255 values directly. Fast but can look muddy.

rgb(128, 128, 128)

#BCBCBC

Gamma-correct (linear RGB)

Averaging in linear light, then re-encoding. Usually the most natural mix.

rgb(188, 188, 188)

#CA8AAA

CIE Lab

Averaging in perceptual Lab space. Keeps perceived lightness balanced.

rgb(202, 138, 170)

Why blue + yellow can look muddy

Mixing blue and yellow in naive sRGB averages the stored numbers, which lands on a dull grey rather than a pleasing green. Averaging in linear RGB or in perceptual Lab keeps the result brighter and closer to what your eye expects, because those spaces account for how displays encode light and how we perceive it. Compare the three results above with the same two inputs to see the difference.

100% Private

Colour mixing runs locally in your browser. Nothing is uploaded.

Colour mixer

How to Use Color Mixer

1

Enter Two Colors

Type or pick the colors you want to blend, such as #ff0000 and #0000ff. You can add more than two colors if you want to average several at once for a combined result.

2

Set the Ratio

Use the ratio slider to weight the mix, from an even 50/50 blend to favouring one color more heavily. The swatches and gradient strip update instantly so you can see each midpoint as you adjust.

3

Compare and Copy

Compare the sRGB, linear RGB, and Lab results, choose the one that fits your intent, and copy its code into your CSS or design tool. Use linear or Lab for natural gradients and sRGB to match other tools.

What a Color Mixer Does and How It Works

A colour mixer blends two or more colours at a ratio you choose and shows the result, but it does something most simple mixers skip: it computes the blend in three different colour spaces and shows all three, because they genuinely disagree and the difference teaches you something. Give it two hex codes and a ratio, and it returns a naive sRGB average, a gamma-corrected linear RGB blend, and a CIE Lab blend, each as its own swatch and code. Designers use it to find a midpoint colour between two palette entries, developers to compute a blended tint, and anyone curious about colour to understand why mixing on a screen often does not match the intuition they built from mixing paint. A ratio slider, support for more than two colours, and a gradient strip round out the everyday features. The reason for three spaces is that a colour's stored numbers are not proportional to its light. sRGB values are gamma-encoded, a non-linear curve that packs more precision into darker tones to match human vision. The naive sRGB average simply takes the mean of each channel as stored, which is fast and is what many tools do, but it blends the encoded numbers rather than the actual light, so midpoints can come out darker or muddier than expected. The gamma-corrected linear RGB blend first removes the gamma to get true light intensities, averages those, then re-applies gamma; this matches how light actually adds and usually gives a brighter, more natural midpoint. The CIE Lab blend interpolates in a perceptually uniform space, so the steps between colours look evenly spaced to the eye, which is often closest to what people expect from a blend. The classic demonstration is mixing blue and yellow. On screen, a naive sRGB average of a strong blue and a strong yellow does not give green as it would with paint; it gives a muddy grey, because the two lights are near-opposite in the encoded channels and their averages cancel toward the middle. In linear RGB the result is brighter but still not the green paint would give, since screens mix light additively rather than mixing pigments subtractively. In Lab the blend follows a perceptual path that many people find lands closer to their expectation. Seeing all three side by side makes the point concrete: there is no single correct mix, only different, well-defined answers, and knowing which space you are blending in explains the result. A worked number helps. Mix pure red #ff0000 and pure blue #0000ff at a 50/50 ratio. The naive sRGB average of the channels is red 127 or 128, green 0, blue 127 or 128, which is about rgb(128, 0, 128), the hex #800080, a mid purple. The linear-RGB blend of the same two colours produces a different, somewhat brighter purple because it averages true light intensities before re-encoding, so its hex will not be #800080. Both are valid midpoints; they simply answer slightly different questions about what mixing means. The mixer shows each so you can pick the one that fits your intent. Use the results with the space in mind. For UI tints and gradients that should look smooth and natural, the linear-RGB or Lab blend is usually the better choice than a raw sRGB average. For matching how another tool computed a blend, the naive sRGB average is often what that tool did, so it helps you reproduce their number. The ratio slider lets you weight one colour more heavily than the other, and mixing more than two colours averages them together in the chosen space. The gradient strip previews the full transition so you can pick any point along it, not just the midpoint. Everything is computed locally in your browser from the colours you enter, so the mixer works offline once the page has loaded and no colour you blend is uploaded, logged, or stored anywhere.

Color Mixer Formula & Method

Blend colors A and B at ratio t (0–1) in three spaces: Naive sRGB: channel = A + (B − A) × t on the stored 0–255 values. Linear RGB: remove gamma → blend → re-apply gamma (matches how light adds). CIE Lab: convert both to Lab → interpolate L, a, b → convert back (perceptually even). Example: 50/50 of #ff0000 and #0000ff in sRGB ≈ rgb(128, 0, 128) = #800080.

Examples: Color Mixer

Input

#ff0000 + #0000ff, 50/50 (sRGB)

Result

≈ #800080 (mid purple)

Averaging the stored channels gives red 128, green 0, blue 128 — a mid purple.

Input

#ff0000 + #0000ff, 50/50 (linear RGB)

Result

A brighter purple, not #800080

Blending true light intensities before re-encoding shifts the midpoint compared with the naive average.

Input

Strong blue + strong yellow (sRGB)

Result

A muddy grey, not green

Screen light mixes additively, so the encoded channels average toward a neutral rather than paint-like green.

Frequently Asked Questions – Color Mixer

It blends the colors at your chosen ratio in three spaces at once: a naive sRGB average, a gamma-corrected linear RGB blend, and a CIE Lab blend. Each result is shown as a swatch with its code, because the three spaces genuinely give different midpoints.