gives the negative of image, in which all colors have been negated.


gives the negative of a color.


gives a list of negative images or colors.


  • ColorNegate, also known as color inversion, replaces every pixel in the image with the negative of that pixel.
  • ColorNegate maps every pixel value or color v to 1-ν. For images with defined color spaces, negation happens in the RGBColor space. »
  • ColorNegate returns a color or an image of the same ColorSpace as the input.
  • ColorNegate works with colors as well as arbitrary 2D and 3D images.


open allclose all

Basic Examples  (2)

Color negate an image:

Negative of the color red:

Scope  (6)

Invert a binary image:

Negative of a black-and-white photo:

Negation of a color image:

Negative of a grayscale 3D image:

Negation of a 3D color volume:

Negative of an Lab color:

Negative of the color Yellow:

Applications  (4)

Invert a color negative:

Create an image effect by only negating the luminance channel of an urban night skyline:

Create false colorizations of an image by negating only one of the three RGB channels:

DeleteSmallComponents deletes small white components:

Make it delete small black components instead:

Properties & Relations  (6)

Color negation is equivalent to subtracting the image from 1:

Color negation happens in the RGBColor space:

Color negation results in the same color regardless of representation:

Color negation of gray results in gray:

Histogram of the negated image is a mirror of the original image:

ColorNegate of an RGB image is equivalent to mapping every pixel v to 1-v:

This does not hold true for other color spaces:

Wolfram Research (2008), ColorNegate, Wolfram Language function, (updated 2014).


Wolfram Research (2008), ColorNegate, Wolfram Language function, (updated 2014).


@misc{reference.wolfram_2021_colornegate, author="Wolfram Research", title="{ColorNegate}", year="2014", howpublished="\url{}", note=[Accessed: 24-October-2021 ]}


@online{reference.wolfram_2021_colornegate, organization={Wolfram Research}, title={ColorNegate}, year={2014}, url={}, note=[Accessed: 24-October-2021 ]}


Wolfram Language. 2008. "ColorNegate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014.


Wolfram Language. (2008). ColorNegate. Wolfram Language & System Documentation Center. Retrieved from