Color Inverter
Instantly calculate the exact mathematical inverse of any HEX, RGB, or HSL color code. Built for designers and developers needing precise contrast pairings.
Original Color
Inverted Color
About
The Color Inverter calculates the exact mathematical opposite of a given color value across the RGB spectrum. By subtracting each color channel's value from the 8-bit maximum (255), it identifies the precise antipode on the color wheel. This process is fundamental in digital imaging for creating photographic negatives, generating accessible high-contrast themes (such as "Dark Mode" inversions), and identifying complementary hues in UI design.
While human perception of color relies on complex psychological and physiological models (like CIELAB), strict RGB inversion provides a programmatic and predictable method for color transformation. It guarantees maximum mathematical contrast for the individual red, green, and blue light emitters, though perceived luminance contrast may vary.
Formulas
Color inversion in the 8-bit RGB color space is calculated by subtracting the current value of each color channel (Red, Green, Blue) from the maximum possible value, which is 255.
Where:
- R, G, B = Original Red, Green, and Blue channel values (0 to 255)
- Rinv, Ginv, Binv = Resulting inverted channel values
Note: The Alpha channel (opacity), represented as A, is typically preserved during standard color inversion. Therefore, Ainv = A.
Reference Data
| Original Color Name | Original HEX | Inverted HEX | Inverted RGB | Resulting Hue |
|---|---|---|---|---|
| White | #FFFFFF | #000000 | 0, 0, 0 | Black |
| Black | #000000 | #FFFFFF | 255, 255, 255 | White |
| Red | #FF0000 | #00FFFF | 0, 255, 255 | Cyan |
| Green | #00FF00 | #FF00FF | 255, 0, 255 | Magenta |
| Blue | #0000FF | #FFFF00 | 255, 255, 0 | Yellow |
| Middle Gray | #808080 | #7F7F7F | 127, 127, 127 | Middle Gray |
| Orange | #FFA500 | #005AFF | 0, 90, 255 | Azure Blue |
| Purple | #800080 | #7FFF7F | 127, 255, 127 | Light Green |
| Pink | #FFC0CB | #003F34 | 0, 63, 52 | Dark Teal |
| Navy | #000080 | #FFFF7F | 255, 255, 127 | Pale Yellow |