Object Methods

These methods are called on a Color object instance. When you invoke the method, it is prefixed with the object instance name and the "." character.

Example:

Color.RED.darker()
brighter()

Creates a brighter version of the Color object by applying an arbitrary scale factor to each of the RGB components. Invoking a series of invocations of the darker and brighter methods might give an inconsistent result because of rounding errors.

darker()

Creates a darker version of the Color object by applying an arbitrary scale factor to each of the RGB components. Invoking a series of invocations of the darker and brighter methods might give an inconsistent result because of rounding errors.

getHue() 

Returns the Numeric hue value of the value in the HSB color model .

getSaturation()

Returns the Numeric saturation value of the value in the HSB color model .

getBrightness() 

Returns the Numeric brightness value of the value in the HSB color model.

getRed() 

Returns the Numeric red component in the range 0-255 in the default sRGB space.

See Also: getRGBA()

getGreen() 

Returns the Numeric green component in the range 0-255 in the default sRGB space.

See Also: getRGBA()

getBlue() 

Returns the Numeric blue component in the range 0-255 in the default sRGB space.

See Also: getRGBA()

getAlpha() 

Returns the Numeric alpha component in the range 0-255.

See Also: getRGBA()

getRGBA() 

Returns the Numeric RGB value representing the color in the default sRGB color model. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue).

See Also: getRed(), getGreen(), getBlue()

toString() 

Returns a string representation in the form "#argb"