This function transforms the color from RGB (Red, Green, Blue)
to HSV (Hue, Saturation, Value). The algorithm determines the value (brightness)
as the maximum RGB component, calculates saturation based on the range of RGB values,
and computes hue based on the relative positions of the RGB components.
Converts an RGB color to the HSV color space.
This function transforms the color from RGB (Red, Green, Blue) to HSV (Hue, Saturation, Value). The algorithm determines the value (brightness) as the maximum RGB component, calculates saturation based on the range of RGB values, and computes hue based on the relative positions of the RGB components.