Public Member Functions | |
PortableColor (int red, int green, int blue) | |
PortableColor (int red, int green, int blue, int alpha) | |
PortableColor (String htmlCode) | |
int | getRed () |
int | getGreen () |
int | getBlue () |
int | getAlpha () |
String | toString () |
boolean | equals (Object o) |
int | hashCode () |
Static Public Attributes | |
static final PortableColor | BLACK = new PortableColor(0,0, 0) |
A portable color that represents a color in the RGBA space with single byte values for each entry (between 0..255). It can convert to and from web color format strings.
com.thecoderscorner.menu.domain.state.PortableColor.PortableColor | ( | int | red, |
int | green, | ||
int | blue | ||
) |
Create a color from RGB with alpha set to full (255), each value from 0 to 255
red | the red component |
green | the green component |
blue | the blue component |
com.thecoderscorner.menu.domain.state.PortableColor.PortableColor | ( | int | red, |
int | green, | ||
int | blue, | ||
int | alpha | ||
) |
Create a color from RGBA using values from 0 to 255
red | the red component |
green | the green component |
blue | the blue component |
alpha | the alpha |
com.thecoderscorner.menu.domain.state.PortableColor.PortableColor | ( | String | htmlCode | ) |
Create a color object from a web color code such as #FFFFFF
htmlCode | the html code |
int com.thecoderscorner.menu.domain.state.PortableColor.getAlpha | ( | ) |
int com.thecoderscorner.menu.domain.state.PortableColor.getBlue | ( | ) |
int com.thecoderscorner.menu.domain.state.PortableColor.getGreen | ( | ) |
int com.thecoderscorner.menu.domain.state.PortableColor.getRed | ( | ) |