How to get the value of an RGB color and convert it to HSV ?

I have an array of RGB pixels , how to change the color of these pixels to HSV, i have searched in documentation and i found : Color.RGBToHSV
public static void RGBToHSV(Color rgbColor, out float H, out float S, out float V);
i don’t know how to use it in my codes … appreciate any help :smiley:

There’s really not much to it - you supply an RGB colour and get HSV values out:

Color inColour = Color.red;  // for example
float h, s, v;
Color.RGBToHSV (inColour, out h, out s, out v);
Debug.Log (h + ", " + s + ", " + v);