# What is the meaning of ColorSpace -> Automatic?

The colour space of an image can be retrieved using Options[im] or ImageColorSpace[im]. A possible value is Automatic. This is what we get when using ColorCombine[channels] without specifying an explicit colour space.

What is the exact meaning of Automatic?

It seems to display like RGB when there are three channels. But it works with any number of channels. How is the colour of a pixel computed when we have a different number of channels than three?

Example:

im = ExampleData[{"TestImage", "Sailboat"}]


{r, g, b} = ColorSeparate[im];

ColorCombine[{r, r, g, b}]


• According to the ImageColorSpace Doc page, ColorSpace -> Automatic means that "no color space specified". So it seems to be a display issue. – Alexey Popkov Oct 10 '17 at 15:54
• I think it deserve to ask support.. – yode Oct 10 '17 at 15:58
• @AlexeyPopkov Not just display, but also determining the output of ColorConvert[manyChannelImage, "RGB"]. It seems to blend adjacent channels according to some rule that's not quite clear to me. – Szabolcs Oct 10 '17 at 15:58
• The formula turns out to be simple: for a number of channels a multiple of 3, partition into threes and take the average of each group. For non multiples of three, take one less value on the first group or first and last as needed. eg 13 channels gives {(a+b+c+d)/4,(e+f+g+h+i)/5, (j+k+l+m)/4)} – george2079 Oct 10 '17 at 20:56
• Asked at WC: community.wolfram.com/groups/-/m/t/1207685 – Alexey Popkov Oct 24 '17 at 10:34