ColorDistance

ColorDistance[c1,c2]
gives the approximate perceptual distance between color directives and .

ColorDistance[list,c]
gives color distances between elements of list and c.

ColorDistance[list1,list2]
gives color distances between corresponding elements of and .

ColorDistance[image,c]
gives an image whose pixel values are color distance between pixels in image and the color c.

ColorDistance[image1,image2]
yields an image giving the pixelwise color distance between and .

Details and OptionsDetails and Options

  • The distance between two colors is computed as the Euclidean distance between the two color vectors in the LABColor space.
  • In the computation of the color distance, the alpha channel is ignored.
  • ColorDistance works with arbitrary 2D and 3D images.
  • With ColorDistance[image,], color distances are returned as an image of a real type with the same dimensions as image.
  • With ColorDistance[image1,image2], and are center aligned, and an image of color distances for the overlapping pixels is returned.
  • ColorDistance supports a DistanceFunction option. The following settings are available:
  • "CIE76"Euclidean distance in LABColor (default)
    "CIE94"color difference defined in LCHColor
    "CIE2000"CIE94 with some corrections
    {"CMC",{l,c}}Color Measurement Committee metric with lightness l and chroma c
    "DeltaL"luminance difference in LCHColor
    "DeltaC"chroma difference in LCHColor
    "DeltaH"hue-based difference in LCHColor
    ffunction f that is given two lists of Lab values
  • With the metric, commonly used parameters are for perceptibility and for acceptability. If not specified, is used.
Introduced in 2014
(10.0)
| Updated in 2015
(10.2)
Translate this page: