Why GIMP Value Invert Keeps Original Hue

GIMP's Value Invert command flips the lightness of an image while preserving its original colors because it operates within the HSV (Hue, Saturation, Value) color space rather than standard RGB. By targeting only the Value channel—which controls lightness—and leaving the Hue and Saturation channels untouched, the tool transforms bright pixels into dark ones and vice versa without shifting colors to their complementary opposites.

The Difference Between RGB and HSV Color Models

To understand why Value Invert behaves this way, it is necessary to contrast how digital colors are represented. In the standard RGB model, every color is a combination of Red, Green, and Blue light values ranging from 0 to 255. When using GIMP’s standard Linear Invert or Perceptual Invert tools, the software calculates the inverse of each separate channel:

  • New Red = 255 - Old Red
  • New Green = 255 - Old Green
  • New Blue = 255 - Old Blue

Because color identity in RGB depends on the ratio between these three primary channels, inverting each channel fundamentally changes the color. For instance, pure blue (0, 0, 255) inverts to pure yellow (255, 255, 0).

How Value Invert Targets Lightness

The HSV color space separates color information into three distinct perceptual components:

  • Hue (H): The base pigment or tint, represented as an angle from 0° to 360° on the color wheel (e.g., red, green, or cyan).
  • Saturation (S): The intensity or purity of the color, ranging from completely gray (0%) to fully saturated (100%).
  • Value (V): The relative brightness or luminance of the color, ranging from completely black (0%) to fully bright (100%).

When you run Colors > Value Invert in GIMP, the software first translates the image data from RGB into the HSV model. Once isolated, the algorithm applies the inversion formula exclusively to the Value component:

\[\text{New Value} = 1.0 - \text{Old Value}\]

The Hue and Saturation coordinates remain strictly unchanged. Finally, GIMP converts the modified HSV data back into RGB so the display can render it.

The Visual Result

Because the Hue value is preserved, a pale sky-blue simply becomes a deep, dark navy blue rather than an inverted warm orange. Highlights become shadows, and shadows become highlights, but the fundamental color palette remains intact. This makes Value Invert particularly useful for creating high-contrast dark modes, stylized color grading, or analyzing exposure details without distorting the underlying color harmony of the original composition.