Color Mixer

This color mixer blends two colors and shows the result at once as HEX, RGB and HSL. You can also lighten, darken or tone down a color and create a gradient with up to 15 steps.

Source: CSS Color 5, W3C – CSS Color Module Level 5: color-mix(). Updated: .

HEX like #E63946, rgb(230, 57, 70) or hsl(...)
HEX, rgb() or hsl()
%
0% = only color 1, 100% = only color 2; when lightening: share of white
2 to 15 colors from color 1 to the target color
My ToolboxYour inputs are saved in this browser only.

Mixed color

#965A72rgb(150, 90, 114) · hsl(336, 25%, 47%)
  • 1/5#E63946
  • 2/5#BE4A5C
  • 3/5#965A72
  • 4/5#6D6B87
  • 5/5#457B9D

Result

Mixed color (HEX)
#965A72
RGB
rgb(150, 90, 114)
HSL
hsl(336, 25%, 47%)
CSS (color-mix)
color-mix(in srgb, #E63946 50%, #457B9D 50%)
Gradient steps
  • #E63946
  • #BE4A5C
  • #965A72
  • #6D6B87
  • #457B9D

How it is calculated

The tool mixes screen colors, that is, light values – not paint made of pigments. That is why red and blue give purple (#800080), while blue and yellow give a neutral gray and not green as with watercolors.

How the mixing works

An in-between value is calculated for each color channel. The mixing space decides how exactly:

Lighten, darken, tone down

Mixing a color with white lightens it (a tint); with black it gets darker (a shade), with gray more muted (a tone). The percentage sets the strength, and the steps give you a whole series – handy for hover states or color scales.

The color-mix() expression can be copied straight into a stylesheet. Matching palettes come from the color palette generator, formats are converted by the color converter, and the contrast checker tells you whether text stays readable.

Frequently asked questions

What do blue and yellow make when mixed?

On a screen a neutral gray (the sRGB average #808080), because light colors are being mixed. With watercolor or acrylic paint blue and yellow make green, since pigments work subtractively.

How do I mix two colors in equal parts?

Enter both colors and leave the share of the second color at 50%. For one third of color 2, enter 33.

How can I lighten or darken a color?

Choose “Lighten a color” or “Darken a color” above and adjust the percentage: at 20% white the color gets a little lighter, at 80% it is almost white.

Which mixing space should I pick?

sRGB matches the default behavior of CSS and most programs. Oklab gives more even gradients, and linear light matches overlapping light sources.

How do I use the result in CSS?

Copy the value under “CSS (color-mix)” and use it as a color in any modern browser, or just take the HEX value.

Sources and legal basis

As of: · Editorial policy

Related tools