Home/Developer Tools/Color Mixer
🖌

Color Mixer

FREE

Blend two colours at any ratio and get the hex

Free · No sign-up required
Loading...

What the colour mixer does

Pick two colours and a ratio and the mixer returns the blend — as a hex code, with a preview of the two inputs and the result. It answers practical questions: what colour is halfway between the brand orange and the brand blue for a gradient midpoint, what does a 20% tint of the primary look like over the page background, what hover colour sits between rest and active. It runs in your browser.

How mixing works

Mixed channel = A × (1 − t) + B × t for each of R, G, B; t = mix ratio 0–1 #E85D26 (232, 93, 38) with #2563EB (37, 99, 235) at 50%: R = 232 × 0.5 + 37 × 0.5 = 134.5 → 135 G = 93 × 0.5 + 99 × 0.5 = 96 B = 38 × 0.5 + 235 × 0.5 = 136.5 → 137 → #876089

This is linear interpolation in sRGB — the same thing CSS gradients do between stops by default. It is simple and predictable, but it has a known weakness: blending two vivid complementary colours passes through a dull grey-brown, because the midpoint of red and blue in RGB has low saturation.

Common uses

  • Gradient midpoints — inspect what the middle of a two-colour gradient will look like before committing.
  • Overlay colours — a 30% mix of the brand colour into white gives the exact background of a tinted section, matching what opacity: 0.3 over white would produce.
  • State colours — hover as a 15% mix toward black, disabled as a 60% mix toward the background.
  • Data visualisation — intermediate colours for a scale between two endpoints.
  • Brand extension — a secondary colour that sits between two existing brand colours so it feels related.

Mix ratios worth knowing

Ratio (B into A)Result
10%A with a hint of B — subtle tint
25%Noticeably shifted toward B; good hover step
50%True midpoint
75%Mostly B
A = any colour, B = white, 90%Very pale tint for backgrounds
A = any colour, B = black, 20%Darker shade for pressed states

The same thing in CSS

/* Mixing at build or design time (this tool) → paste the hex */ background: #876089; /* Mixing at runtime, supported in all current browsers */ background: color-mix(in srgb, #E85D26 50%, #2563EB); /* Perceptually better midpoints */ background: color-mix(in oklch, #E85D26 50%, #2563EB);

color-mix() lets you mix custom properties without knowing their values — ideal for theming. Its in srgb result matches this tool exactly; in oklch avoids the grey-brown midpoint problem for vivid pairs.

Frequently asked questions

Why does my mix of red and green look brown?

Linear RGB mixing of complementary colours loses saturation at the midpoint. That is a property of the maths, not a bug. For a vivid intermediate, mix in HSL or OKLCH, or route the gradient through a third colour.

Is this the same as layering with opacity?

Yes for a solid background: colour A at opacity t over colour B equals mix(B, A, t). The tool gives you the flattened hex, which is useful when you want the same look without transparency.

Can I mix more than two colours?

Mix two, then mix the result with a third. Ratios compound — a three-way equal mix is A+B at 50%, then that with C at 33%.

Why is the result slightly different from Photoshop or Figma?

Design tools may mix in a different colour space or apply gamma correction. sRGB linear mixing is the web default; differences are usually a few units per channel.

How do I find the ratio that produced a colour?

Not directly; adjust the ratio until the preview matches. For a colour between two known ones, the ratio is (result − A) ÷ (B − A) on any channel where A and B differ.

Are my values stored?

No. Everything runs in your browser.

More tools in this category

🌈
Color Code Converter
Convert between HEX, RGB, RGBA, CMYK, HSV and HSL
🎨
Color Shades & Tints
Ten lighter and ten darker steps from one colour
Color Adjustments
Warm, cool, desaturate or invert a colour
🔢
Word Counter
Count characters, words, sentences, paragraphs and lines
📄
Lorem Ipsum Generator
Generate placeholder words, sentences or paragraphs
🔡
Text Cleaner & Case Converter
UPPER, lower, Title, camelCase, snake_case, kebab-case; trim and collapse spaces