Skip to content
AZ Tools

Color Mixer

Interpolate between two colors in RGB, HSL, or CIELAB space. See a gradient strip of intermediate steps.

Result

#8033B3

11-step blend

0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%

LAB gives the most perceptually even gradient. RGB and HSL are faster but may look uneven in the middle.

How to use

  1. Set color A and color B (hex or color picker).
  2. Choose RGB, HSL, or LAB blending.
  3. Slide the ratio or read off the 11-step strip.

About this tool

Show

Pick two colors and a mix ratio (0–100%). The tool interpolates between them in your chosen color space — RGB for the simplest math, HSL for hue-preserving blends, or CIELAB for perceptually uniform transitions — and shows the result plus an 11-step gradient strip. Useful for picking midpoint accent colors, generating color stops for gradients, or seeing why two colors look muddy in the middle (usually because their RGB midpoint isn't perceptually halfway).

The muddy middle has a specific cause. sRGB values are gamma-encoded rather than proportional to light, so averaging two of them averages the encoding and not the brightness. Blending pure red and pure green in RGB gives a dark olive that looks nothing like the yellow you would get by mixing the light itself, and the same shortcut is why a red-to-green gradient passes through a dead zone in the middle. Interpolating in linear light avoids it; interpolating in CIELAB avoids it and keeps the steps evenly spaced to the eye as well.

HSL interpolation has its own trap, which is that hue is an angle. Going from red at 0 to blue at 240 can travel forwards through yellow and green or backwards through magenta, and the two routes produce completely different gradients. Most implementations take the shorter arc, which is usually right and is occasionally the opposite of what you wanted.

The even-looking strip is what CIELAB buys. Equal steps in RGB are not equal steps in appearance, so a linear ramp between two colours can look like it lingers at one end and rushes at the other; the space was designed so that a given numerical distance corresponds to roughly the same perceived difference anywhere in it.

None of this is how paint behaves. Mixing pigments is subtractive, so blue and yellow give green, while mixing light is additive and the same pair gives a pale grey. Every space here models light, which is what a screen emits, and a colour chosen this way will not match what happens on a palette.

Frequently asked questions

Why do RGB blends look muddy in the middle?

RGB averages the channel values directly. Going from saturated red to saturated blue passes through a low-saturation purplish-gray midpoint because the green channel stays at 0. Try HSL or LAB to keep saturation higher in the middle.

When should I use LAB?

LAB is perceptually uniform — equal numerical steps look like equal perceptual steps. Best for gradient design when smoothness matters. CSS color-mix(in lab, …) does the same thing in modern browsers.

What happens to hue with HSL when the two colors are opposite?

HSL takes the shorter arc around the color wheel. Mixing red (0°) and cyan (180°) is ambiguous — the tool picks one direction; if the result surprises you, try LAB instead.

Why is my 50% mix not exactly halfway visually?

Only LAB will give you a perceptually halfway result. RGB and HSL halfway points are mathematically halfway, which is often perceptually closer to the darker of the two endpoints.

Related tools