DominantColors

DominantColors[image, n]
returns at most n dominant colors in image.

DetailsDetails

  • DominantColors returns a list of colors that represent clusters of colors that appear in the image. The colors are represented by GrayLevel or RGBColor.
  • The returned colors are ordered based on the size of the clusters they represent.
  • DominantColors uses the Lab color space to find color clusters.
  • With the setting Masking->region, a region of interest can be specified.
  • DominantColors works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Find eight common colors in an image:

In[1]:=
Click for copyable input
Out[1]=

Create and visualize a color palette:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »