converts colors from the rgb color space to L*ab color space so that they can later be compared