Skip to content
ColorKit

Blending, three ways

Color mixer that shows all three answers

This mixer is free and needs no account: put two colors in, drag the ratio, and it hands back three blends rather than one, because “what is red plus green” has three defensible answers and most tools quietly choose for you. Half red and half green is #808000 in gamma-encoded sRGB, #bcbc00 in linear light and #c9ab00 in CIE Lab — a spread of 22 points of perceived lightness from the same two inputs. Five colors can go in at once with independent weights, and with exactly two the page also draws the nine-step path through each space so you can see where the curve bends.

  • 100% free
  • No signup
  • 3 spaces at once
  • Up to 5 colors
  • color-mix() output

What goes in

Press Ctrl+V anywhere on the page to drop in a hex code for the first slot — no need to click the field first.

Three spaces, three answers

  • #808000

    sRGB

    What CSS color-mix(in srgb) does

    L* 51.7 · C* 58.0

  • #bcbc00

    Linear light

    What two lamps aimed at one wall do

    L* 73.8 · C* 76.9

  • #c9ab00

    CIE Lab

    Keeps perceived lightness on the straight line

    L* 70.5 · C* 73.2

The sRGB and Lab answers sit ΔE 27.1 apart. Below about 2.3 nobody could tell them apart in a side-by-side; above 10 they are different colors that happen to have the same recipe.

The whole path, not just the midpoint

  • sRGB
  • Linear light
  • CIE Lab

Nine equal steps from the first color to the second. Where a strip dips darker in the middle than at either end, that is the gamma dip — the sRGB numbers were never proportional to light in the first place.

The same blend as CSS

color-mix(in srgb, #ff0000 50%, #00ff00)

This line reproduces the sRGB card exactly. Swapping srgb for oklab in it moves the result close to the Lab card without matching it — they are different spaces, and the browser computes oklab itself.

How to mix two colors

Two inputs, one ratio, and three results that disagree for reasons worth knowing.

  1. Drop two colors into the slots

    Type or paste into either slot: hex with or without the hash, rgb(), hsl(), the slash-alpha form or any CSS keyword, and the two slots do not have to use the same notation. A slot that cannot be parsed turns orange and is left out of the blend instead of being read as black, so a half-typed hex never quietly poisons the result.

  2. Set the ratio, or add a third color

    Each slot carries a weight from 0 to 100 and the shares are normalized, so weights of 3 and 1 mean 75% and 25% and there is no need to make them add up to anything. Up to five colors can go in at once; the weighted average is reached by folding each new slot in at w / (total + w), which is what mixing four inks at 40, 30, 20 and 10 actually means.

  3. Read the three cards, then pick the one your job needs

    The cards show the same blend computed in gamma-encoded sRGB, in linear light and in CIE Lab, each with its L* and chroma, and the ΔE line underneath says how far apart the sRGB and Lab answers have landed. Copy the hex you want, or copy the color-mix() line, which reproduces the sRGB card exactly in any browser from Chrome 111, Safari 16.2 and Firefox 113 onward.

Technical specifications

Interpolation spacesThree, recomputed on every keystroke: gamma-encoded sRGB, linear light, and CIE Lab under the D65 white point
Colors per mix2 to 5 slots, each weighted 0-100; shares are normalized, so 3 and 1 mean 75% and 25%
Ramps9 equal steps per space, drawn whenever exactly two slots are in use
Input notationsHex in 3, 4, 6 and 8 digits, rgb(), rgba(), hsl(), hsla(), the CSS Color 4 slash-alpha form and the 148 CSS keywords, mixed freely between slots
Worked example#0000ff with #ffff00 at 50/50: #808080 in sRGB, #bcbcbc in linear light, #ca8aaa in Lab
CSS parityThe sRGB card equals color-mix(in srgb, …) — supported in Chrome 111, Safari 16.2 and Firefox 113 and later
Difference readoutLive ΔE76 between the sRGB and the Lab result, in CIE Lab units
What is transmittedNothing — the three blends are arithmetic performed in this tab

Frequently asked questions

Why does blue plus yellow give me gray instead of green?

Because interpolating channel values is not what paint does. Halfway between #0000ff and #ffff00 in sRGB is #808080, chroma 0 — a perfectly neutral gray, since each channel is averaging its own opposite. Linear light gives the same neutral, brighter, at #bcbcbc, and Lab gives #ca8aaa, a dusty pink. Green comes from pigments subtracting wavelengths from reflected light, a process no interpolation between two RGB triples models; predicting it properly needs Kubelka-Munk theory and spectral reflectance data for the actual paints.

Which of the three spaces should I use?

Use sRGB when the blend has to match what a browser will do, linear light when the two colors represent light rather than pigment, and Lab when a human is going to judge the result. The first is what color-mix(in srgb) and every canvas globalAlpha composite compute; the second is correct for glows, additive overlays and anything that models photons; the third is the one that keeps a mid-blend from looking darker than both of its parents.

Why is the sRGB blend darker than both of the colors going into it?

Because sRGB numbers are gamma-encoded, so their average is not the average of the light they stand for. Red and green at 50/50 land on #808000 at L* 51.7, while the two parents average L* 70.5 — the blend is 19 points of perceived lightness darker than either of the colors that produced it. In linear light the same mix is #bcbc00 at L* 73.8, and Lab puts it at L* 70.5, exactly the average of the endpoints, because holding L* steady is what the Lab path is for.

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

The sRGB card is identical to color-mix(in srgb, …) and the page prints that line for you to copy. CSS also accepts other interpolation spaces, and swapping srgb for oklab in the copied line moves the browser's result close to the Lab card without matching it — Oklab and CIE Lab are different spaces with different lightness scales, and the browser computes its own. The function is available from Chrome 111, Safari 16.2 and Firefox 113.

Does the order of the colors change the result when I mix three or more?

Not in sRGB or linear light, where the fold is a weighted average and arithmetic does not care about order. In Lab it can shift slightly: each intermediate result is brought back inside the sRGB gamut before the next color folds in, so a chain that passes through an out-of-gamut midpoint loses a little chroma on the way. With ordinary screen colors the difference stays under a unit of ΔE.

What happens to transparency?

Alpha interpolates alongside the channels, so mixing #ff000080 with an opaque color gives a result that is partly transparent, and the hex output grows to eight digits to say so. Note that a translucent result has no single appearance until it sits on a background — the swatch here is drawn over the page, so judge it against the surface you will actually use.

Why does mixing two brand colors give me something close to gray?

Because averaging two hues that sit far apart on the wheel pulls the result toward the neutral axis, and the further apart they are the harder it pulls. Blending #2563eb with #f59e0b at 50/50 in sRGB produces #8d817b, whose chroma is 6.0 against 80.1 and 78.8 for the two parents — technically a color, visually a warm gray. Mixing in Lab keeps more of it, at chroma 27.2, but nothing recovers saturation that the average genuinely does not contain.

About what mixing two colors really means

The number in a hex code is not an amount of light. sRGB is gamma-encoded: the value 128 stands for roughly 21% of the light that 255 stands for, not 50%, because the encoding spends more of its 256 steps on the dark end where the eye is more sensitive. Averaging two encoded values therefore averages neither the light nor the appearance, and that single fact explains every disagreement on this page. White and black at 50/50 come out as #808080 at L* 53.6 in sRGB, as #bcbcbc at L* 76.1 in linear light — the physically correct answer for two lamps — and as #777777 for the eye, which is where L* is exactly 50.

None of the three is a model of paint. Pigments work by subtraction, each one removing wavelengths from the light that bounces back, and the result depends on the particular pigments, their opacity and their particle size; that is Kubelka-Munk territory and it needs spectral data no hex code carries. What the three spaces here do model is compositing, light and perception respectively, which covers what a screen actually does. The one place a mixer regularly surprises people is with pairs that sit far apart on the wheel — averaging drags the result toward the neutral axis, which is why an exact complement and its partner blend to something with almost no chroma at all.

Mixing toward a specific second color, over and over, is common enough to have its own vocabulary: white gives tints, black gives shades and mid gray gives tones, which is what the shades generator lays out in three columns; when the goal is eleven rungs that a framework can address by number, the Tailwind scale generator sets each one by target lightness instead of by mixing at all. Two colors lifted from a screenshot with the image color picker are the usual reason to open a mixer in the first place, and flat artwork traced by PNG to SVG arrives as a handful of solid fills that often need one blended intermediate between them. If you want a whole set rather than one blend, the palette generator starts from a harmony rule instead of an average, and the random generator will hand you a second color to blend with when you have only one.

Where the blending happens

Every number on this page is worked out by JavaScript running in the tab you are reading it in. Nothing you type, paste or open is uploaded, logged or kept, which is also why the tools carry on working after you disconnect from the network.

Nothing about the mixer needs a server: three interpolations and a ΔE are a few dozen floating-point operations, so the colors you are comparing — which are often a client's unreleased brand pair — never leave the tab they were typed into.