reimplemented foundation::linear_rgb_to_hsv() to avoid a division by zero.