# How can color spaces be compared?

I am currently working on image classification methods. One group of preprocessing methods are color space transformations. While there are "traditional" color spaces like RGB (the raw data), HSV, LUV, XYZ, ..., I see any function

$$f:[0, ..., 255]^3 \rightarrow [0, ..., 255]^3$$

as a transformation from one color space in another color space (starting from RGB). Having multiple of those transformation functions $f_i$, I would like to be able to compare them.

Is there a common way to visualize color spaces for comparison? A metric which defines how "close" color spaces are? This measure of "closeness" could be interesting to estimate how much of a difference the choice of color space makes for the classifier.

I thought I could probably take a set of images and use the average euclidean distance of them as one way to compare them. Or just some randomly sampled colors and their average euclidean distance. But I guess there are more sophisticated ways?

• I'm not sure if I should add a "color-space" or "computer-graphics" tag. – Martin Thoma Apr 28 '17 at 9:44
• I'm not 100% on the question. You're asking how to visualize the color spaces, rather than images within the color spaces? – Nat Apr 28 '17 at 15:59
• Well, for humans it does not really make sense to visualize images in another color space. (This is a bit like showing numbers in base 2 because the computer uses base 2). What I want is to write more than just: This is the color space transformation function which turned out to work. Ideally, I want to find properties of this color space. My current best idea is to create a cylinder like this for the transformed color space. But I thought there might be more sophisticated ways to compare which I'm just not aware of. – Martin Thoma Apr 28 '17 at 17:43