Skip to content
Color Codes

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.

This is useful for “blend two colors” tasks such as building a gradient midpoint, creating chart ramps, softening a brand accent, or generating a transition between success and warning states.

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.

A quick Hex alpha rule of thumb: 1A is about 10%, 40 is about 25%, 80 is about 50%, BF is about 75%, and FF is fully opaque. Use the calculator when you need exact opacity values.

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