Home › Image Tools › Color Mixer

Color Mixer

Pick two colors, slide the ratio and see the mixed color instantly with its HEX, RGB, HSL and OKLCH codes. Compare perceptual mixing with classic blend modes and grab every in-between step.

Last updated:

Result#000000
CSS

Steps from A to B

Click a step to use that ratio, or its code to copy it.

Advertisement
Advertisement

How to use the Color Mixer

  1. Choose color A and color B with the pickers or type HEX codes.
  2. Pick a mixing method: OKLab for smooth, natural-looking mixes, sRGB to match most design tools, or a blend mode.
  3. Move the slider to set how much of color B goes into the mix.
  4. Press Mix colors (the result also updates live) and click any code to copy it.
  5. Use the steps row to see the whole gradient between A and B and copy every step.

Mixing formulas

With t as the share of color B (0 to 1) and channel values from 0 to 255:

MethodFormula#ff0000 + #0000ff at 50%
sRGBC = A + (B − A) × t on the stored values#800080
Linear RGBDecode sRGB gamma, mix, encode again#bc00bc
OKLabMix L, a and b in the OKLab perceptual space#8c53a2
OKLCHMix lightness and chroma, rotate hue the short way#b200b8
HSLMix hue (short way), saturation and lightness#ff00ff

The differences are biggest for complementary or very different colors. For two similar colors, every method gives nearly the same result.

Blend mode formulas

For blend modes the values are scaled to 0–1, B is the top layer and the slider is B's opacity: result = A + (blend(A, B) − A) × opacity.

  • Multiply: A × B. Example: #ff8000 × #808080 = #804000.
  • Screen: 1 − (1 − A)(1 − B). Example: #ff8000 screen #808080 = #ffc080.
  • Overlay: 2AB if A ≤ 0.5, otherwise 1 − 2(1 − A)(1 − B).
  • Darken / Lighten: min(A, B) / max(A, B) per channel.
  • Color dodge / burn: A ÷ (1 − B) and 1 − (1 − A) ÷ B, clipped to 0–1.
  • Difference / Exclusion: |A − B| and A + B − 2AB.

Tips

  • Need a hover or pressed shade? Mix your color with black (#000000) at 10–20% for darker states and with white at 10–20% for lighter tints.
  • Building a gradient? Copy the steps generated in OKLab or OKLCH to avoid the gray "dead zone" that sRGB gradients get between complementary colors.
  • Matching a design file? Use sRGB mixing and the blend modes, which follow the same formulas as Figma, Photoshop and CSS.

Frequently asked questions

What color do red and blue make?

It depends on how you mix. Averaging the sRGB numbers of #ff0000 and #0000ff gives #800080, a dark purple. Mixing in linear light gives a brighter #bc00bc, and OKLab gives #8c53a2, a soft violet that looks halfway between the two. Paint behaves differently again, because pigments absorb light.

Which mixing method should I use?

OKLab is the best general choice: the steps look evenly spaced and the middle does not turn muddy or too dark. Use sRGB if you need to match Photoshop layers, CSS opacity or most design tools, and linear RGB to simulate mixing colored lights.

Is this the same as mixing paint?

No. Screens mix light additively, while paint mixes subtractively. Blue and yellow light make gray or white, but blue and yellow paint make green. The multiply blend mode is the closest digital stand-in for layering transparent inks.

How do blend modes work here?

Color B is treated as a layer on top of color A, and the slider sets B's opacity. Each channel is combined with the W3C compositing formulas, for example multiply = A × B and screen = A + B − A × B, using values from 0 to 1.

Can I use the result in CSS?

Yes. Copy the HEX or RGB code, or use the generated color-mix() expression, which modern browsers support in srgb, srgb-linear, oklab, oklch and hsl.

How is the halfway sRGB color calculated?

Each channel is averaged: for #ff8800 and #0088ff the red channel is (255 + 0) ÷ 2 = 127.5, rounded to 128 (hex 80), green is 136 (88) and blue is 128 (80), giving #808880.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Color Shades GeneratorTurn one HEX color into a 50-950 scale plus tints, shades and tones, ready to export.Color Palette GeneratorGenerate beautiful color palettes and export them.HEX to RGBConvert HEX colors to RGB and other formats.Color Name FinderFind the closest color name for any HEX or RGB color.Blend Two ImagesOverlay two photos with opacity, 16 blend modes, fades and free positioning, then download.Color Hue TestDrag color caps into hue order, FM100-style, and get an error score and a hue error chart.Online Coloring PagesColor animal, holiday and mandala pages online with bucket fill and brushes, then print or save PNG.Element Mixing GameMix water, fire, earth and air to discover 400+ items. Discovery book, hints, works offline.RGB to HEXConvert RGB to HEX with sliders, live swatch and one-click copy.HEX to HSLConvert HEX colors to HSL and back with interactive sliders.RGB to CMYK ConverterConvert RGB and HEX colors to CMYK for print, and back.Color Contrast CheckerCheck WCAG contrast ratios and find accessible text colors.Pantone to HEXLook up approximate HEX, RGB and CMYK values for Pantone colors.Color Blindness SimulatorSee any image as people with protanopia, deuteranopia, tritanopia or achromatopsia see itImage Color PickerPick any pixel colour from an image and get HEX, RGB, HSL plus a paletteTailwind Color GeneratorTurn one color into a full Tailwind 50–950 shade scale and export the config or CSS.Random Color GeneratorGenerate random HEX colors one at a time or in batches, with hue, saturation and lightness ranges.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.Color PickerPick any color and get HEX, RGB, HSL, HSV and CMYK codes, shades and a screen eyedropper.HTML Color CodesAll 140 HTML color names with HEX and RGB codes, plus the 216 web-safe colors. Click to copy.Color Palette from ImageExtract the main colors of any photo as HEX codes, CSS variables and a palette PNG.CMYK to RGBConvert CMYK percentages to RGB and HEX color codes with sliders and a live preview.HSL to HEXConvert HSL and HSLA colors to HEX and RGB with sliders and a live preview.HEX to RGBAConvert HEX color codes to CSS rgba() with an opacity slider and one-click copy.RGBA to HEXConvert rgba() colors to 8-digit HEX, or flatten transparency onto any background.HEX to CMYKConvert HEX color codes to CMYK percentages for print, with a live preview.HEX to PantoneFind the 5 closest Pantone-style solid coated colors for any HEX or RGB, ranked by Delta E.Color Temperature to RGBConvert a color temperature in kelvin (1000-40000 K) to RGB and HEX with a live swatch.OKLCH Color ConverterConvert HEX, RGB and HSL to OKLCH, OKLab, Lab and LCH with sRGB and P3 gamut checks.RAL to HEXLook up RAL Classic codes as HEX, RGB and CMYK, search by name or find the nearest RAL.RGB to HSLConvert RGB values to HSL, HSV and HWB with a live swatch and copy-ready CSS.Color Code ConverterConvert a color between HEX, RGB, HSL, HSV, CMYK, LAB, LCH and OKLCH with a live swatch.Room Paint Color VisualizerUpload a room photo, select the walls and preview any paint color or HEX with real lighting.Photo to Pop ArtMake Warhol-style pop art from a photo: posterized color tiles in 1, 4 or 9 grids with custom palettes.Screen Color PickerPick any pixel color from anywhere on your screen and copy it as HEX, RGB or HSL.Solid Color Image GeneratorMake a plain single-color or transparent image in any size, like 1920x1080, as PNG or JPG.White Balance CorrectorFix color casts: click a neutral gray point or use auto gray world, then fine-tune temperature and tint.CMYK to HEXConvert CMYK percentages to a HEX color code and RGB, with a live swatch and shades.Photo Color MatchCopy the color grading of a reference photo onto your image (Reinhard color transfer).Underwater Photo Color CorrectionRestore lost reds and remove the blue or green cast from underwater photos by depth.
See all 38 Color Tools →