Make sure the color is in the RGB colorspace before fetching the components.