Skip to main content

Free Color Mixer: Blend Two Colors With sRGB, HSL, or OKLCH Interpolation

Pick two colors, slide the ratio, and see the mix instantly — with three blending models (gamma-correct sRGB, HSL midpoint, and perceptually-uniform OKLCH). Live gradient preview, exact HEX/RGB/HSL output. Useful for design-system shade ramps and accessible color-pair fixes.

Blend model

Gamma-correct linear-light mix. Default for most use cases.

Color A
Color B
Mix ratio50% B · 50% A
#0F62FE#FFFFFF
Mixed color#BCC5FF
HEX#BCC5FF
RGBrgb(188, 197, 255)
HSLhsl(231, 99%, 87%)
Nine-step gradient (sRGB Linear)

Click any step to copy its HEX value.

Quick pairs

Three Blend Models

sRGB Linear (gamma-correct), HSL Midpoint (hue-aware), and OKLCH (perceptually uniform — modern CSS Color 4 standard). See which one matches your design intent.

Precise Ratio Slider

Slider from 0% (pure A) to 100% (pure B) in 1% steps. Live preview updates as you move; output values reflect the exact mix.

Gradient Step Strip

Nine-step gradient between A and B showing the full transition. Great for visualizing the difference between sRGB and OKLCH mixing.

100% Client-Side

All color math runs locally. No uploads, no signup, no tracking. Works offline once loaded.

Three Ways to Mix Two Colors — And When Each Matters

Mixing colors digitally sounds simple — average the R, G, and B values between two inputs and you have the midpoint. But naive RGB averaging produces muddy, dim midpoints because sRGB is gamma-encoded; mixing in linear light fixes brightness but still passes through gray for complementary pairs; perceptually uniform spaces like OKLCH produce the transitions your eye expects. Our Free Color Mixer implements all three models so you can see the difference directly — toggle between modes on the same two colors and watch the 9-step gradient strip change.

Pair this with our Color Picker (sample the two endpoints from images), Palette Generator (build a full palette from a single seed), Contrast Checker (verify the mix passes WCAG against your background), and the CSS Gradient Generator (turn the two endpoints into a production CSS gradient).

Three Blend Models, Compared

ModelBest ForWatch Out For
sRGB LinearMost cases; default behavior most design tools useMixing complementary colors (blue ↔ yellow, red ↔ green) passes through gray.
HSL MidpointStaying on the hue wheel; preserving saturation through mixLightness shifts can look muddy when the two colors have very different L values.
OKLCHPerceptually uniform brightness; smoothest transitionsLarger compute cost; results may differ subtly from existing assets that were built in sRGB.

Rule of thumb in 2026: default to OKLCH for new designs; fall back to sRGB Linear when matching existing assets; use HSL when you specifically want hue-preserving behavior.

Where a Color Mixer Pays Off

Design system shade ramps

Generate 5, 7, or 9 intermediate shades between a primary and dark accent for a design-token palette.

Hover / pressed states

Pick a primary brand color, mix 15% black for the hover state and 30% black for pressed. Consistent UI states without hand-picking each.

Two-color gradients

Visualize the midpoint of any gradient — the midpoint is what users actually see at the centerline of a hero background.

Accessible color pair fixes

When a brand color fails WCAG contrast, mix it toward white (or black) at a known ratio until the contrast passes — without abandoning the brand identity.

Visualizing OKLCH benefits

Compare an RGB-linear mix vs an OKLCH mix between e.g. blue and yellow — RGB passes through a muddy gray, OKLCH passes through a clean lime green.

The Gamma Encoding Trap

1. sRGB Is Not Linear Light

Display-space sRGB values are gamma-encoded for storage efficiency. Averaging them naively produces dim midpoints — visible as the "muddy gradient" problem.

2. Photoshop Does This Wrong

By default, gradients in older Photoshop versions and many design tools mix in sRGB space — not linear light. The visible artifacts are subtle but real.

3. Browsers Now Fix This

CSS Color 4 added "in oklch", "in oklab", and "in srgb-linear" modifiers to linear-gradient(). Modern browsers (Chrome 111+, Safari 16.4+) honor them.

4. Always Verify Visually

Math alone does not tell you which mode looks "right" for your specific pair. Toggle modes here, look at the 9-step strip, pick the one your eyes prefer.

Free Color Mixer: Blend Two Colors (sRGB, HSL, OKLCH) With Live Preview | Toolk