How to blend two HEX colors
- Enter two 3- or 6-digit HEX colors, such as
#FF0000and#0000FF. - 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. - 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.