Converts the components of a color, as specified by the default RGB
model, to an equivalent set of values for hue, saturation, and
brightness that are the three components of the HSB model.
Converts the components of a color, as specified by the default RGB
model, to an equivalent set of values for hue, saturation, and
brightness that are 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.
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.
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 used to return the
three HSB values, or null
Since:
JDK1.0
See Also:
Color.getRGB()
,
Color.Color(int)
,
ColorModel.getRGBdefault()
,