@version 10 Feb 1997 @author Sami Shaio @author Arthur van Hoff @see ColorSpace @see AlphaComposite
Spectrum
, which supports various mathematical operations.
@author Brad Kimmel
@version 10 Feb 1997 @author Sami Shaio @author Arthur van Hoff @see ColorSpace @see AlphaComposite
All modifiers support method chaining, e.g. Color result = Color.TOMATO.copy().setAlpha(0.4).scaleRGB(0.8).blend(Color.GREEN, 0.3);
Color
is a lame extension of java.awt.Color
, with a few extra convenience functions tacked on. There should probably be a better way of doing this, but I'm too lazy right now...
@author Greg
@see java.awt.Color
Where there is no basic colors (RGB all equal 0) then you get black; where each color is at maximum (RGB all equal 255) you get white.
<-- most sig least sig --> +-------------------------------+ | 0 | blue | green | red | +-------------------------------+The red, green and blue bytes can be extracted as follows.
red = ((color ) & 255) green = ((color >> 8) & 255) blue = ((color >> 16) & 255)Changes as from 1.4.0: use top 8 bits as an alpha channel. 0 = opaque, 255 = transparent. Changes as from 2.0.0: use top 8 bits as full alpha channel 255 = opaque, 0 = transparent [to conform with SVG, PDF and others] and everything in between is used [which means that NA is not stored as an internal colour; it is converted to R_RGBA(255, 255, 255, 0)]
The following features are supported:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|