Color calculation

Digital Color Mixing and Opacity Explained

Learn how screen colors blend, how alpha compositing changes the visible result and how to build useful transition scales.

Published Β·Updated

Digital mixing combines emitted light values; it is not the same process as mixing physical paint. A simple sRGB blend interpolates red, green and blue channels between two endpoints.

At a 50% mix, #FF7F50 coral and #008080 teal contribute equally. Try the pair in the online color mixer and compare its five-step and ten-step transitions.

What alpha changes

Alpha describes coverage from fully transparent to fully opaque. The final visible color also depends on the background:

.veil {
  background: rgb(255 127 80 / 50%);
}

That declaration looks lighter over white and darker over black. The opacity calculator shows both the encoded transparent value and the composited result.

Eight-digit Hex stores alpha in the final pair. For example, #FF7F5080 is approximately 50% coral. RGBA and HSLA express the same idea more explicitly.

Build transitions with a purpose

A generated scale is a starting point, not automatically a complete design system. Check contrast at every step, ensure adjacent values remain distinguishable and consider perceptual interpolation such as OKLCH when visual uniformity matters. sRGB interpolation remains useful for matching common browser and graphics workflows.

For the notation behind every output, read Hex vs RGB vs HSL.

Continue reading