Color.RGBtoHSB
Class Overview | Class Members |
This Package |
All Packages
public static float[] RGBtoHSB( int r,
int g,
int b,
float hsbvals[] )
Parameters
- r
- the red component of the color.
- g
- the green component of the color.
- b
- the blue component of the color.
- hsbvals
- the array to be used to return the
three HSB values, or null.
Returns
an array of three elements containing the hue, saturation,
and brightness (in that order), of the color with
the indicated red, green, and blue components.
Description
Converts the components of a color, as specified by the RGB
model, to an equivalent set of values for hue, saturation, and
brightness, the three components of the HSB model.
If the hsbvals argument is null, then a
new array is allocated to return the result. Otherwise, the method
returns the array hsbvals, with the values put into
that array.
See Also
getRGB, Color