Find out RGB in Viewport

Hi
I want to store the color I assigned to an object in the inspector.
Let’s say I set my material to a color I am happy with and want to store it in my script so I can switch back to it later.
Atm I use a print screen, go to Photoshop and use the color picker to find out the RGB, because Unity is displaying them in HSV. That can’t be right, suggestions?

Unity uses RGB, not HSL. Unity’s color values stored in the Material go from 0.0 to 1.0, not 0 to 255 like in Photoshop. Unity does have a Color32 you can cast the Color class to in order to output colors in the format used by Photoshop:

var c32 : Color32 = renderer.material.color;
Debug.Log(c32);