Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Image Processing & Analysis > Color Processing >
Mathematica > Visualization and Graphics > Graphics Options & Styling > Colors > Color Processing >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Directives > Colors > Color Processing >

ColorQuantize

ColorQuantize[image, n]
gives an approximation to image that uses only n distinct colors.
  • ColorQuantize by default uses dithering to diffuse color quantization errors.
Approximate a true color image with 10 discrete color values:
Create a duotone image:
Approximate a true color image with 10 discrete color values:
In[1]:=
Click for copyable input
Out[1]=
 
Create a duotone image:
In[1]:=
Click for copyable input
Out[1]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team