ColorConvert¶
Convert between color spaces.
Hue and CMYKColor are accepted as inputs too.
A converted image records the space it was converted to, where one that was never converted has none:
Images convert between the same spaces the color directives do, pixel by
pixel. In "HSB" red is hue 0 and green is hue ⅓, both fully saturated:
$ wo 'ImageData[ColorConvert[Image[{{{1., 0., 0.}, {0., 1., 0.}}}], "HSB"]]'
{{{0., 1., 1.}, {0.3333333432674408, 1., 1.}}}
A grayscale image is read as the gray RGB it stands for, so it gains the extra channels:
An alpha channel is not a color channel and rides along unchanged: