@Implements(value=android.graphics.Color.class)
public class ShadowColor
extends java.lang.Object
| Constructor and Description |
|---|
ShadowColor() |
| Modifier and Type | Method and Description |
|---|---|
static int |
HSVToColor(int alpha,
float[] hsv) |
static void |
RGBToHSV(int red,
int green,
int blue,
float[] hsv)
This is implemented in native code in the Android SDK.
|
@Implementation
public static void RGBToHSV(int red,
int green,
int blue,
float[] hsv)
This is implemented in native code in the Android SDK.
Since HSV == HSB then the implementation from java.awt.Color can be used, with a small adjustment to the representation of the hue.
java.awt.Color represents hue as 0..1 (where 1 == 100% == 360 degrees), while Color represents hue as 0..360 degrees. The correct hue can be calculated by multiplying with 360.
red - Red componentgreen - Green componentblue - Blue componenthsv - Array to store HSV components@Implementation
public static int HSVToColor(int alpha,
float[] hsv)