Digital Color

Color Interpolation

The method of calculating intermediate colors between two endpoints, critical for gradients, animations, and color mixing.

Color interpolation determines how transitional colors are computed between two specified colors. The result varies dramatically depending on the color space used for interpolation. Interpolating in sRGB can produce desaturated, muddy midpoints (especially between complementary colors), while interpolating in OKLCH maintains perceptual vibrancy throughout the transition. CSS Color Level 4 allows specifying the interpolation color space in gradients: background: linear-gradient(in oklch, red, blue). Choosing the right interpolation space is one of the most impactful decisions in gradient design, color animation, and programmatic palette generation.

Try It Out

Related Articles