This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ColorConvert

ColorConvert
converts color specifications in expr to refer to the color space represented by colspace.
  • The expression expr can be a color specification such as RGBColor[...] or Red, an Image object, an explicit list of color channel values, or an image.
{v}gray level
{v,a}gray level and parameter
{r,g,b}red, green, blue levels
{r,g,b,a}RGB with parameter
"Grayscale"gray level
"RGB"red, green, blue
"CMYK"cyan, magenta, yellow, black
"HSB"hue, saturation, brightness
  • With the option setting ColorSpace->src, ColorConvert interprets channel values in list according to the color space src.
Convert a color photo to grayscale:
Convert to CMYK:
This shows that the previous output is a CMYK image:
Convert an RGB color object to CMYK:
Convert an intensity value to RGB:
Convert an RGB color object to HSB:
Convert a color photo to grayscale:
In[1]:=
Click for copyable input
Out[1]=
 
Convert to CMYK:
In[1]:=
Click for copyable input
Out[1]=
This shows that the previous output is a CMYK image:
In[2]:=
Click for copyable input
Out[2]=
 
Convert an RGB color object to CMYK:
In[1]:=
Click for copyable input
Out[1]=
 
Convert an intensity value to RGB:
In[1]:=
Click for copyable input
Out[1]=
 
Convert an RGB color object to HSB:
In[1]:=
Click for copyable input
Out[1]=
New in 7 | Last modified in 8