2013-03-17 56 views

回答

4

试试这个代码:

float hue = 180.0f; 
int color = Color.HSVToColor(new float[] { hue, 1.0f, 1.0f }); 

更多信息:

/** 
* Convert HSV components to an ARGB color. Alpha set to 0xFF. 
*  hsv[0] is Hue [0 .. 360) 
*  hsv[1] is Saturation [0...1] 
*  hsv[2] is Value [0...1] 
* If hsv values are out of range, they are pinned. 
* @param hsv 3 element array which holds the input HSV components. 
* @return the resulting argb color 
*/ 
public static int HSVToColor(float hsv[]) { 
+0

感谢您的帮助,这个华很难,但我发现 – Ajouve 2013-03-19 07:14:52

+0

您可能需要将其设置回答是正确的。 – 2013-03-19 16:11:20