public static void RGBToHSV(Color rgbColor, out float H, out float S, out float V) { if (rgbColor.b > rgbColor.g && rgbColor.b > rgbColor.r) { Color.RGBToHSVHelper(4f, rgbColor.b, rgbColor.r, rgbColor.g, out H, out S, out V); } else if (rgbColor.g > rgbColor.r) { Color.RGBToHSVHelper(2f, rgbColor.g, rgbColor.b, rgbColor.r, out H, out S, out V); } else { Color.RGBToHSVHelper(0f, rgbColor.r, rgbColor.g, rgbColor.b, out H, out S, out V); } }