Color Processing

The Wolfram Language provides convenient functions and algorithms for manipulating colors and color images, with full generality for arbitrary numbers of color channels.

Basic Operations

ColorNegate negate color values

Blend blend color values

ImageDemosaic reconstruct a color image from raw images

Color Adjustments

ImageAdjust uniformly adjust levels, brightness, contrast, gamma, etc.

BrightnessEqualize correct uneven brightness

Lighter  ▪  Darker  ▪  ColorBalance  ▪  ColorToneMapping

Level & Histogram Processing

ImageHistogram histogram of levels by channel

ImageLevels tally of levels in each channel

Binarize  ▪  FindThreshold  ▪  Threshold

HistogramTransform  ▪  HistogramTransformInterpolation

Color Segmentation

DominantColors find a list of dominant colors

ImageRecolor recolor regions of an image with a new color

ColorDetect  ▪  FindMatchingColor  ▪  ColorQuantize  ▪  ColorReplace

Color Spaces

ColorConvert convert between color spaces

ColorSpace option for specifying color spaces

ImageColorSpace gives the color space setting for an image

"Grayscale", "RGB", "CMYK", "HSB", "XYZ", "LAB", "LCH", "LUV" named color spaces

ColorProfileData representation for general color spaces

Color Visualization

ChromaticityPlot visualize gamut of a color space or an image

ChromaticityPlot3D  ▪  ImageWaveformPlot  ▪  ImageVectorscopePlot

Channel Operations

ColorSeparate, ColorCombine separate, combine color channels

ImageChannels the number of channels in an image

AlphaChannel the alpha channel of the image

SetAlphaChannel  ▪  RemoveAlphaChannel

Pixel Operations

ImageValuePositions, PixelValuePositions coordinates of pixels of a given color

ImageValue, PixelValue get the value of a pixel at the specified position

ReplaceImageValue, ReplacePixelValue replace the value of specified pixels

ImageApply apply an arbitrary function to each pixel value

ImageScan scan over every pixel of an image, applying a function

Pseudocolor Images »

Colorize create pseudocolor images

ReliefImage create an image from data using simulated relief

HighlightImage highlight the region of interest in an image

Colors »

RGBColor specify a color by its red, green, and blue values

LABColor  ▪  GrayLevel  ▪  Red  ▪  Green  ▪  RandomColor  ▪  ...

ColorQ  ▪  ColorDistance  ▪  ColorSetter  ▪  ...