● Color Tools

Color Mixer - Blend & Mix Two Colors Online

Mix and blend two or more colors in customizable percentage ratios using RGB additive light or subtractive pigment blending.

Free to Use
No sign-up required
100% Client-Side
Your data stays private
Instant Results
Get results in seconds

Color Mixer

Mix and blend two or more colors in customizable percentage ratios using RGB additive light or...

Mix Colors
Choose 2–4 colors, select a blend mode, then adjust ratios to get your final color.
Number of Colors
Colors
Blend Mode
Mixing Ratios
Mixed Color Result
HEX
#000000
RGB
0, 0, 0
HSL
0°, 0%, 0%
Mode
Normal
Understanding color mixing
Digital color mixing is additive: combining colors generally increases brightness compared to pigment mixing (subtractive) where mixtures tend to darken. Use ratios to control each color’s influence and blend modes to control how channels interact.
Blend modes explained
Normal averages colors based on ratios. Multiply darkens, Screen lightens, and Overlay combines both for contrast. Difference and Exclusion highlight channel differences, while Darken/Lighten keep the darker/lighter channels.
Color formats
  • HEX for web/CSS (example: #FF0000)
  • RGB for digital screens (0–255 per channel)
  • HSL for hue/saturation/lightness adjustments
Tool Details

About Color Mixer

● Color Tools

What is a Color Mixer & How Does It Work?

A Color Mixer blends two or more color inputs according to custom mathematical percentage weights. In UI/UX design, game engine rendering, digital illustration, and traditional oil painting, calculating smooth intermediate color transitions allows artists to build balanced gradients, hover states, and atmospheric lighting.

The Mathematics of Color Interpolation (Lerp)

The standard algorithm for blending two colors ($C_1$ and $C_2$) using a blending ratio factor ($t \in [0.0, 1.0]$) is Linear Interpolation (Lerp) across each discrete color channel:

$$R_{\text{blend}} = \text{round}\left( (1 - t) \times R_1 + t \times R_2 \right)$$

$$G_{\text{blend}} = \text{round}\left( (1 - t) \times G_1 + t \times G_2 \right)$$

$$B_{\text{blend}} = \text{round}\left( (1 - t) \times B_1 + t \times B_2 \right)$$

(Where $t = 0.50$ represents a perfect 50/50 balance).

---

Real-World Worked Examples

Example 1: 50/50 Blend of Pure Red and Pure Blue

  • Color 1 (Pure Red): `#FF0000` $\rightarrow \text{rgb}(255, 0, 0)$
  • Color 2 (Pure Blue): `#0000FF` $\rightarrow \text{rgb}(0, 0, 255)$
  • Red Channel: $(0.5 \times 255) + (0.5 \times 0) = \mathbf{128}$
  • Green Channel: $(0.5 \times 0) + (0.5 \times 0) = \mathbf{0}$
  • Blue Channel: $(0.5 \times 0) + (0.5 \times 255) = \mathbf{128}$
  • Resulting Blended Midpoint: `rgb(128, 0, 128)` / `#800080` (Classic Purple)

Example 2: 70/30 Blend of Navy Blue and Sun Yellow

  • Color 1 (70%): `#003366` $\rightarrow \text{rgb}(0, 51, 102)$
  • Color 2 (30%): `#FFCC00` $\rightarrow \text{rgb}(255, 204, 0)$
  • Red: $(0.70 \times 0) + (0.30 \times 255) = 0 + 76.5 = \mathbf{77}$
  • Green: $(0.70 \times 51) + (0.30 \times 204) = 35.7 + 61.2 = \mathbf{97}$
  • Blue: $(0.70 \times 102) + (0.30 \times 0) = 71.4 + 0 = \mathbf{71}$
  • Resulting Color: `rgb(77, 97, 71)` / `#4D6147` (Muted Sage Olive)

---

Step-by-Step Guide: How to Blend Colors

  1. Choose Color 1 and Color 2: Pick colors using the hex inputs or visual pickers.
  2. Adjust the Mix Ratio Slider: Slide from 0% (pure Color 1) to 100% (pure Color 2).
  3. Select Number of Transition Steps: Generate 5, 10, or 20 intermediate palette swatches.
  4. Copy CSS Snippets: Click any swatch to copy its HEX or CSS `color-mix()` property.
  5. Explore Related Tools: Pair with our Gradient Generator and Color Palette.

---

Color Harmony, Subtractive vs. Additive Models & UI Blending

Mixing colors digitally requires choosing the appropriate mathematical blending mode to avoid dull, muddy intermediate tones:

  • Additive vs. Subtractive Mixing: Computer screens emit light using additive RGB mixing, where combining all primary channels yields pure white (`#ffffff`). Physical paints and printing inks use subtractive CMYK mixing, where combining pigments absorbs light and produces black/dark brown. Our digital color mixer simulates linear light interpolation for crisp web gradients.
  • Perceptual Color Spaces (OKLab & Lab): Standard linear RGB interpolation often creates greyish, desaturated "dead zones" when mixing opposing hues (like blue and yellow). Modern UI designers interpolate colors through perceptual color spaces like CIE Lab or OKLab, which preserve perceived chroma and brightness across color transitions.
  • Color Token Weighting: Design systems frequently blend 90% of a base neutral grey with 10% of a primary brand color to generate subtle, harmonious tinted card backgrounds and border strokes that feel organically tied to the brand aesthetic.

Digital Design Best Practices

  • WCAG Accessibility Verification: Ensure that any dynamically generated blend steps used for interactive button states (hover, focus, active) retain adequate contrast against container surfaces.
  • CSS `color-mix()` Integration: Modern browsers support native CSS `color-mix(in srgb, #2563eb 70%, #10b981 30%)`.
  • Related Tools: See our Gradient Generator, Color Palette Generator, and Color Picker.

Perceptual Uniformity with OKLab & LCH

Linear RGB color interpolation often creates muddy, desaturated greyish tones when mixing complementary colors like blue and yellow. Modern CSS Color Module Level 4 introduces the `color-mix()` function in `oklab` color space, which maintains perceptual brightness and chroma throughout the blend, producing vibrant, natural gradients.

Color Gamut Clipping & Out-of-Gamut Warnings

When mixing vibrant, highly saturated primary colors in standard sRGB color space, linear mathematical interpolation can generate coordinates exceeding 255 or falling below 0. Clipping these values artificially can alter hue balance. Normalizing color vectors ensures smooth, artifact-free tonal transitions.

Quick Tip
Linear RGB blending produces a muddy gray midpoint; our mixer utilizes gamma-corrected perceptual blending to create vibrant, natural gradients.

Why Mix Colors with ToolSpark?

Granular Blend Ratio Slider

Blend colors in precise percentage increments from 0% (Color 1) to 100% (Color 2).

Perceptual Color Interpolation

Supports linear RGB, sRGB gamma-corrected, and LAB/LCH perceptual color blending.

Step-by-Step Palette Swatches

Generates 5, 10, or 20-step gradient swatch transition stops between your two base colors.

Multi-Format Export

Exports blended midpoints in HEX, RGB, HSL, and CSS color-mix() functional syntax.

100% Client-Side Privacy

Your palette blends are calculated locally in your browser with zero data storage.

FAQ

Frequently Asked Questions About Color Mixer

What is the formula to blend two RGB colors?

Formula for linear interpolation (lerp): Blended Channel = (Color1 × (1 - weight)) + (Color2 × weight). For example, a 50/50 blend of Red (255) and Blue (0) yields: (255 × 0.5) + (0 × 0.5) = 127.5 → 128.

What color do you get when you mix Red and Blue?

In RGB light blending, equal parts Red (#FF0000) and Blue (#0000FF) produce Purple/Magenta (#7F007F or #800080). In physical paint mixing, red and blue produce violet.

What color do you get when you mix Blue and Yellow?

In physical subtractive pigment mixing (paint/CMYK), Blue and Yellow produce Green. In additive digital RGB light mixing, blue light plus yellow light (red+green) produces White or neutral gray!

What is CSS color-mix()?

Modern CSS introduces the native `color-mix()` function: `background: color-mix(in srgb, red 40%, blue);` which blends colors natively in the browser without JavaScript.

Why do some digital color blends look dark or muddy in the middle?

Standard linear RGB math fails to account for gamma correction. Perceptual color spaces (like OKLAB or CIE LAB) maintain consistent perceived brightness across the entire transition.

Can I mix more than two colors?

Yes. You can take the blended midpoint of two colors and mix it with a third color to create sophisticated multi-tone corporate palettes.

What is a tint vs. a shade in color mixing?

Mixing a color with pure White (#FFFFFF) produces a Tint. Mixing a color with pure Black (#000000) produces a Shade. Mixing with Gray (#808080) produces a Tone.

How do painters use this color mixer?

Traditional oil and acrylic painters use this tool to calculate exact pigment weight ratios required on their physical artist palette.