Color Quantization of Photographic Images I: Palette from Colors in the Image

Color quantization reduces the number of colors in an image to a limited set of distinct colors, called a palette.
This Demonstration illustrates how a photographic image can be quantized using a palette of up to eight colors present in the image.
While moving/creating/deleting the locators, select between one and eight pixels in the image on the left and see the pixel segments of the image having similar colors on the right. The colors of the selected pixels are displayed in the top right corner. Similarity of colors is evaluated by the Euclidean distance between their RGB values.
See also the histograms of the original and the quantized image at the bottom.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.