Improve consistency of colorsys.rgb_to_hsv (GH-27277)

Cache repeated difference to make code easier to read and consistent with colorsys.rgb_to_hls.
1 file changed