Color Mixer – Blend HEX Colors in RGB or OKLab

Blend two HEX colors by percentage, compare the RGB and OKLab results, and copy seven intermediate color swatches. Export CSS, CSV or JSON in your browser, without uploading any colors.

Mixed color result

The comparison uses the same blend percentage in both color spaces. Changing the interpolation method does not modify either input color.

Choose a ratio to copy your mixed HEX color.

Seven intermediate color swatches

Choose a swatch to copy its HEX. The first and last colors always match your inputs; the five colors between them use the selected interpolation method.

Exported CSS contains calculated HEX values and works even in browsers that do not support color-mix(). JSON uses the same portable sac-ma-mix-v1 format as the Vietnamese tool. You can edit the seven swatches further in the Palette Generator.

How to blend two HEX colors

  1. Enter two 3- or 6-digit HEX colors, such as #FF0000 and #0000FF.
  2. Choose RGB or OKLab and move the slider from 0% (first color) to 100% (second color). At 50%, encoded RGB blending of red and blue returns #800080.
  3. Copy the result, any of the seven swatches, or download CSS, CSV or JSON. You can transfer the gradient of colors to Palette Generator and check text readability with Contrast Checker.

RGB versus OKLab mixing

RGB interpolates the encoded sRGB channel values directly, rather than mixing light linearly. OKLab interpolates a perceptual lightness coordinate and two color coordinates. Out-of-gamut intermediate colors are chroma-mapped into sRGB, so the resulting HEX can differ from browser color-mix(in oklab, ...).

This tool mixes screen colors, not physical paint or printing inks. For example, encoded RGB blending of yellow #FFFF00 and blue #0000FF at 50% yields gray #808080, not green. Color harmony does not guarantee WCAG text contrast.

More tools: Color converter · Color wheel · Palette Generator.