Invert a color

Create the RGB complement of a color for a negative or inverse swatch.

freeworks offlinenothing uploaded
ToolColor Inverter
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Each channel in the selected RGB color space is replaced by its complement against the channel maximum, producing a photographic negative in that space. Alpha is preserved unless the selected operation explicitly changes it.

  • Channel complementation is deterministic and reversible for normalized RGB values.

Worked example

Invert Coral
Invert a coral color to get its negative
Input
											#FF6B6B
										
Output
												#FF6B6B -> #009494
											

When to use this

Image effects, inverse theme swatches, and color transformation tests invert RGB channels.

Edge cases

  • Inverting gamma-encoded sRGB differs from inverting linear light.
  • A transparent pixel’s alpha should not be inverted with RGB.
  • Out-of-gamut values need clamping or conversion before inversion.

References