Color mixer: blend two or more colors by weight
This color mixer blends 2 to 10 colors into one. You give each color a weight from 0 to 100, pick a mixing mode, and read the result as HEX, RGB, HSL and OKLCH. Use it to find a midpoint between two brand colors, build a tint, or test how colors combine on screen.
The tool is free, runs in your browser and needs no signup. The mixed color updates instantly as you change a color or a weight.
How to use the color mixer to mix colors online
You can mix colors online in a few steps. Start with the two default colors, then change them and adjust the weights.
- Pick each color with the color picker or type a value (such as
#FF0000or a CSS color name) in its field. - Set the weight for each color. The proportions bar under the list shows each color's share of the final mix.
- Press Add color to mix up to 10 colors. Remove any color above the minimum of two with its cross button.
- Choose a Mixing mode: sRGB, Linear RGB or OKLab.
- Read the Mixed Color Result and copy the HEX, RGB, HSL or OKLCH value with its copy button.
- Press Save mix to keep it in your browser, or Share link to copy a link that reopens the same mix.
Color mixer settings and outputs you can use
The Color Mixer gives you a small set of controls and several ready-to-copy outputs.
- Weighted colors: mix 2 to 10 colors, each with its own weight. Drag the grip handle to reorder them.
- Three mixing modes: sRGB (gamma-encoded), Linear RGB (light) and OKLab (perceptual).
- Side-by-side comparison: the sRGB vs Linear RGB vs OKLab Mix panel shows all three results. Select one to switch to it.
- Quick mix presets: + White (tint), + Black (shade), + Gray (tone) and Equal weights.
- Color values and name: HEX, RGB, HSL and OKLCH, plus the nearest color name. Click the swatch to open details.
- Contrast hint: the contrast ratio of the result against white text and black text, with an AA pass or fail badge at 4.5:1.
- Code tabs: CSS variables,
color-mix()and JSON, each with a copy button.
How does a color mixer calculate a weighted mix?
A weighted mix is a weighted average of the color channels. Each color contributes its weight divided by the total of all weights, so weights of 50 and 50 give each color a 50% share, and 75 and 25 give shares of 75% and 25%.
In formula form, each channel of the result is (w1 x C1 + w2 x C2 + ...) divided by (w1 + w2 + ...), where C is the channel value of a color and w is its weight. The tool does this for red, green and blue at once.
Only the ratio matters. Weights of 1 and 3 behave like 25 and 75. A color with weight 0 has no effect.
Worked example: mixing red and blue in sRGB
Mix #FF0000 (rgb(255, 0, 0)) and #0000FF (rgb(0, 0, 255)) at 50 and 50 in sRGB mode. The red channel is 255 x 0.5 = 127.5 and the blue channel is also 127.5. Rounded, the result is rgb(128, 0, 128), which is #800080, a dark purple.
Change the weights to 75 for red and 25 for blue. The result moves toward red: rgb(191, 0, 64), or #BF0040. The contrast hint for #800080 shows about 9.41:1 with white text and 2.22:1 with black text, so white text passes WCAG AA (4.5:1) and black text does not.
What is the difference between sRGB, Linear RGB and OKLab mixing?
The three modes average the same colors in different number spaces, so they give different results. The mode you pick should match where you will use the color.
| Mode | What gets averaged | Red + blue, 50/50 | Best for |
|---|---|---|---|
| sRGB | Gamma-encoded channel values | #800080 | Matching most design apps and CSS color-mix(in srgb) |
| Linear RGB | Linear light values, then re-encoded | #BC00BC | Physically accurate light mixing |
| OKLab | Perceptual lightness and color axes | #8C53A2 | A midpoint that looks evenly between the inputs |
The sRGB color space stores values with a gamma curve, which is why averaging them directly gives darker midpoints than averaging light. OKLab is a perceptual color space designed so that equal numeric steps look more like equal visual steps. If an OKLab mix falls outside what screens can show, the tool reduces its chroma until the color fits.
Make tints, shades and tones with the color mixer
A tint is a color mixed with white, a shade is a color mixed with black, and a tone is a color mixed with gray. The presets add these neutrals for you.
Press + White (tint) to add #FFFFFF as a new color at weight 25. Press + Black (shade) or + Gray (tone) for #000000 or #808080. If that neutral is already in the list, the button raises its weight by 10 instead.
For a clean tint of one color, keep two colors and set the weights yourself. Red #FF0000 at 75 and white at 25 gives #FF4040. A full scale of steps is easier with the tint and shade scale generator, and the Tints & shades button opens your mixed color there.
Why does mixing blue and yellow not give green?
Blue and yellow mix to gray or a light blend here because the Color Mixer averages screen light, not paint pigment. Screens add light, while paint subtracts it by absorbing wavelengths.
Pure #FFFF00 and #0000FF at 50/50 give #808080 in sRGB, #BCBCBC in Linear RGB and #6CABC7 in OKLab. None is green, and that is correct for light. Read the additive vs subtractive color comparison for the theory. For print inks, try the CMYK color mixer.
Use the color mixer output in CSS color-mix()
The color-mix() tab outputs native CSS that reproduces your mix in the browser. The function is defined in CSS Color Module Level 5 and documented on MDN Web Docs.
For three or more colors, the tool nests several color-mix() calls so the weights stay exact. It also adds a plain HEX fallback line above them. A two-color example looks like this:
.mixed {
background-color: #800080; /* fallback */
background-color: color-mix(in srgb, #FF0000 50%, #0000FF);
}The CSS variables tab gives --mixed-color in HEX, an RGB channel version and an OKLCH version. The JSON tab lists your inputs, weights, shares and the result, which suits design token files. The copy buttons give you the same color in whichever format your project needs.
Color mixing tips and common mistakes
- Save and share useful mixes. Saved mixes stay in this browser only, so use Share link when a teammate needs the same colors, weights and mode.
- Match the mode to the destination. Use sRGB if the color must equal what a design app or CSS
srgbmix produces. Use OKLab when you want a visually even midpoint. - Check the text contrast. The hint covers white and black text only. For other pairs, run a full WCAG contrast check.
- Do not expect paint results. Blending screen colors will not copy pigment behavior.
- Watch the total weight. If every weight is 0, the tool shows a message and no result. Give at least one color a weight above 0.
- Mix similar lightness for smooth blends. Very dark and very light colors in sRGB can produce muddy midpoints. Compare all three modes before you commit.
- Convert perceptual values carefully. To read an OKLCH result as HEX elsewhere, use the OKLCH to HEX converter.
Who uses a color mixer?
Designers use the Color Mixer to create in-between brand colors, hover states and disabled states. Developers use the color-mix() output to derive variants in CSS without extra variables. Students use it to see how color averaging works in different color spaces.
Illustrators and teachers can use the side-by-side comparison to show why the same two colors give different midpoints in different spaces. Anyone can use a shared link to send a mix to a teammate.
Next, turn a mix into a full set of related colors with the color harmonies generator, or see every step between two colors with the color interpolation tool.