Color and design guides

Invert sRGB channels and verify the alpha is unchanged

·

Use an RGB inverse when you need the full negative of an encoded screen color. Inspect the resulting channels and opacity separately, especially when a translucent swatch will appear over several backgrounds.

Color Inverter

Invert the translucent blue swatch

Select Translucent blue. The original value is #21436580. Its first three bytes represent 33, 67 and 101. The last byte, 80 in hexadecimal, represents 128 out of 255.

Subtract each color channel from 255. Expect red 222, green 188 and blue 154. The Inverted HEX line reads #DEBC9A80, with the same last byte. The checkerboard remains partly visible through both swatches.

Select Invert the result. The previous inverse becomes the input and the result reads #21436580.

CSS Color 4 sRGB notation and HEX alphaFilter Effects Level 1 full RGB inversion

Choose a CSS color or a filter for the element

For a single CSS color declaration, copy Inverted RGB or Inverted HEX. For a full element filter, copy CSS filter to get filter: invert(100%). Test the actual element because a filter affects its rendered content as a whole.

Select Red. The original is #FF0000 and the inverted color is #00FFFF. Use those opaque colors to compare full CSS inversion without background compositing.

Filter Effects Level 1 full RGB inversion

Check both swatches over the intended background

For a translucent color, put the inverted color over the intended page surface. The component alpha is the same as the original, so the surface can change the resulting displayed color.

Download the report and compare the original and inverted channel values. If you entered a fractional opacity such as 0.5, use Inverted RGB to keep that number. Eight-digit HEX rounds opacity to the nearest byte.

CSS Color 4 sRGB notation and HEX alpha

Common questions

What does middle gray #808080 become?

It becomes #7F7F7F because 255 minus 128 is 127 in all three channels.

Does RGB inversion check text contrast?

Inversion defines the new RGB values. Use a contrast check on the rendered foreground and background to review readability.

Sources

Put it into practice.

Related guides