|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.style.AbstractModeledColor<RGBColor.Component>
com.guiseframework.style.RGBColor
public class RGBColor
Encapsulates a color value of the sRGB color space.
| Nested Class Summary | |
|---|---|
static class |
RGBColor.Component
A color component of sRGB. |
| Constructor Summary | |
|---|---|
RGBColor(java.lang.CharSequence charSequence)
Creates an RGB color from the specified string representation. |
|
RGBColor(double red,
double green,
double blue)
Creates an opaque sRGB color with the specified red, green, and blue component values. |
|
RGBColor(double red,
double green,
double blue,
double alpha)
Creates an sRGB color with the specified red, green, blue, and alpha component values. |
|
RGBColor(int rgb)
Creates an opaque sRGB color from the specified sRGB color value. |
|
RGBColor(int argb,
boolean hasAlpha)
Creates an sRGB color from the specified sRGB color value and alpha indication. |
|
RGBColor(int red,
int green,
int blue)
Creates an opaque sRGB color with the specified absolute red, green, and blue component values. |
|
RGBColor(int red,
int green,
int blue,
int alpha)
Creates an sRGB color with the specified absolute red, green, blue, and alpha component values. |
|
| Method Summary | |
|---|---|
HSLColor |
asHSL()
Converts this RGB color to an HSL color. |
RGBColor |
asRGB()
|
int |
getAbsoluteAlpha8()
|
int |
getAbsoluteBlue8()
|
int |
getAbsoluteGreen8()
|
int |
getAbsoluteRed8()
|
double |
getAlpha()
|
double |
getBlue()
|
double |
getGreen()
|
double |
getRed()
|
static RGBColor |
valueOf(java.lang.CharSequence charSequence)
Creates an RGB color from a string representation. |
| Methods inherited from class com.guiseframework.style.AbstractModeledColor |
|---|
checkComponentValue, equals, getAbsoluteComponent, getComponent, getValues, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final RGBColor TRANSPARENT
public static final RGBColor ALICE_BLUE
public static final RGBColor ANTIQUE_WHITE
public static final RGBColor AQUA
public static final RGBColor AQUA_MARINE
public static final RGBColor AZURE
public static final RGBColor BEIGE
public static final RGBColor BISQUE
public static final RGBColor BLACK
public static final RGBColor BLANCHE_DALMOND
public static final RGBColor BLUE
public static final RGBColor BLUE_VIOLET
public static final RGBColor BROWN
public static final RGBColor BURLY_WOOD
public static final RGBColor CADET_BLUE
public static final RGBColor CHARTREUSE
public static final RGBColor CHOCOLATE
public static final RGBColor CORAL
public static final RGBColor CORNFLOWER_BLUE
public static final RGBColor CORNSILK
public static final RGBColor CRIMSON
public static final RGBColor CYAN
public static final RGBColor DARK_BLUE
public static final RGBColor DARK_CYAN
public static final RGBColor DARK_GOLDEN_ROD
public static final RGBColor DARK_GRAY
public static final RGBColor DARK_GREEN
public static final RGBColor DARK_KHAKI
public static final RGBColor DARK_MAGENTA
public static final RGBColor DARK_OLIVE_GREEN
public static final RGBColor DARK_ORANGE
public static final RGBColor DARK_ORCHID
public static final RGBColor DARK_RED
public static final RGBColor DARK_SALMON
public static final RGBColor DARK_SEA_GREEN
public static final RGBColor DARK_SLATE_BLUE
public static final RGBColor DARK_SLATE_GRAY
public static final RGBColor DARK_TURQUOISE
public static final RGBColor DARK_VIOLET
public static final RGBColor DEEP_PINK
public static final RGBColor DEEP_SKY_BLUE
public static final RGBColor DIM_GRAY
public static final RGBColor DODGER_BLUE
public static final RGBColor FELDSPAR
public static final RGBColor FIRE_BRICK
public static final RGBColor FLORAL_WHITE
public static final RGBColor FOREST_GREEN
public static final RGBColor FUCHSIA
public static final RGBColor GAINSBORO
public static final RGBColor GHOST_WHITE
public static final RGBColor GOLD
public static final RGBColor GOLDEN_ROD
public static final RGBColor GRAY
public static final RGBColor GREEN
public static final RGBColor GREEN_YELLOW
public static final RGBColor HONEY_DEW
public static final RGBColor HOT_PINK
public static final RGBColor INDIAN_RED
public static final RGBColor INDIGO
public static final RGBColor IVORY
public static final RGBColor KHAKI
public static final RGBColor LAVENDER
public static final RGBColor LAVENDER_BLUSH
public static final RGBColor LAWN_GREEN
public static final RGBColor LEMON_CHIFFON
public static final RGBColor LIGHT_BLUE
public static final RGBColor LIGHT_CORAL
public static final RGBColor LIGHT_CYAN
public static final RGBColor LIGHT_GOLDEN_ROD_YELLOW
public static final RGBColor LIGHT_GREY
public static final RGBColor LIGHT_GREEN
public static final RGBColor LIGHT_PINK
public static final RGBColor LIGHT_SALMON
public static final RGBColor LIGHT_SEA_GREEN
public static final RGBColor LIGHT_SKY_BLUE
public static final RGBColor LIGHT_SLATE_BLUE
public static final RGBColor LIGHT_SLATE_GRAY
public static final RGBColor LIGHT_STEEL_BLUE
public static final RGBColor LIGHT_YELLOW
public static final RGBColor LIME
public static final RGBColor LIME_GREEN
public static final RGBColor LINEN
public static final RGBColor MAGENTA
public static final RGBColor MAROON
public static final RGBColor MEDIUM_AQUA_MARINE
public static final RGBColor MEDIU_MBLUE
public static final RGBColor MEDIUM_ORCHID
public static final RGBColor MEDIUM_PURPLE
public static final RGBColor MEDIUM_SEA_GREEN
public static final RGBColor MEDIUM_SLATE_BLUE
public static final RGBColor MEDIUM_SPRING_GREEN
public static final RGBColor MEDIUM_TURQUOISE
public static final RGBColor MEDIUM_VIOLET_RED
public static final RGBColor MIDNIGHT_BLUE
public static final RGBColor MINT_CREAM
public static final RGBColor MISTY_ROSE
public static final RGBColor MOCCASIN
public static final RGBColor NAVAJO_WHITE
public static final RGBColor NAVY
public static final RGBColor OLD_LACE
public static final RGBColor OLIVE
public static final RGBColor OLIVE_DRAB
public static final RGBColor ORANGE
public static final RGBColor ORANGE_RED
public static final RGBColor ORCHID
public static final RGBColor PALE_GOLDEN_ROD
public static final RGBColor PALE_GREEN
public static final RGBColor PALE_TURQUOISE
public static final RGBColor PALE_VIOLET_RED
public static final RGBColor PAPAYA_WHIP
public static final RGBColor PEACH_PUFF
public static final RGBColor PERU
public static final RGBColor PINK
public static final RGBColor PLUM
public static final RGBColor POWDER_BLUE
public static final RGBColor PURPLE
public static final RGBColor RED
public static final RGBColor ROSY_BROWN
public static final RGBColor ROYAL_BLUE
public static final RGBColor SADDLE_BROWN
public static final RGBColor SALMON
public static final RGBColor SANDY_BROWN
public static final RGBColor SEA_GREEN
public static final RGBColor SEA_SHELL
public static final RGBColor SIENNA
public static final RGBColor SILVER
public static final RGBColor SKY_BLUE
public static final RGBColor SLATE_BLUE
public static final RGBColor SLATE_GRAY
public static final RGBColor SNOW
public static final RGBColor SPRING_GREEN
public static final RGBColor STEEL_BLUE
public static final RGBColor TAN
public static final RGBColor TEAL
public static final RGBColor THISTLE
public static final RGBColor TOMATO
public static final RGBColor TURQUOISE
public static final RGBColor VIOLET
public static final RGBColor VIOLET_RED
public static final RGBColor WHEAT
public static final RGBColor WHITE
public static final RGBColor WHITE_SMOKE
public static final RGBColor YELLOW
public static final RGBColor YELLOW_GREEN
| Constructor Detail |
|---|
public RGBColor(java.lang.CharSequence charSequence)
colorname, one of the HTML color names, which must be in all lowercase without delimiters, such as "aliceblue".#rgb, with hexadecimal representation of color components without regard to case.#rrggbb, with hexadecimal representation of color components without regard to case.transparent color name as equivalent to rgba(0, 0, 0, 0), or black with zero alpha.
In most instances, the valueOf(CharSequence) static method is preferred for string-based construction, as it allows singleton instances of named RGB colors to be used.
charSequence - The character sequence representation of a color, either a lowercase name of a standard HTML color, or a three or six-digit hex code beginning with '#'.
java.lang.NullPointerException - if the given string is null.
java.lang.IllegalArgumentException - if a color cannot be determined from the given string.public RGBColor(int rgb)
rgb - The color value composed of 8 bits each of red, green, and blue.
public RGBColor(int argb,
boolean hasAlpha)
argb - The color value composed of 8 bits each of alpha, red, green, and blue (0xAARRGGBB).hasAlpha - true if the given value contains alpha information, else false if default opaque alpha should be added.
public RGBColor(int red,
int green,
int blue)
red - The red component on an absolute scale in the range (0x00-0xFF).green - The green component on an absolute scale in the range (0x00-0xFF).blue - The blue component on an absolute scale in the range (0x00-0xFF).
java.lang.IllegalArgumentException - if one of the values is outside the range (0x00-0xFF).
public RGBColor(int red,
int green,
int blue,
int alpha)
red - The red component on an absolute scale in the range (0x00-0xFF).green - The green component on an absolute scale in the range (0x00-0xFF).blue - The blue component on an absolute scale in the range (0x00-0xFF).alpha - The alpha component on an absolute scale in the range (0x00-0xFF).
java.lang.IllegalArgumentException - if one of the values is outside the range (0x00-0xFF).
public RGBColor(double red,
double green,
double blue)
red - The red component.green - The green component.blue - The blue component.
java.lang.IllegalArgumentException - if one of the values is outside the range (0.0-1.0).
public RGBColor(double red,
double green,
double blue,
double alpha)
red - The red component.green - The green component.blue - The blue component.alpha - The alpha component.
java.lang.IllegalArgumentException - if one of the values is outside the range (0.0-1.0).| Method Detail |
|---|
public double getRed()
public int getAbsoluteRed8()
public double getGreen()
public int getAbsoluteGreen8()
public double getBlue()
public int getAbsoluteBlue8()
public double getAlpha()
public int getAbsoluteAlpha8()
public HSLColor asHSL()
public RGBColor asRGB()
public static RGBColor valueOf(java.lang.CharSequence charSequence)
colorname, one of the HTML color names, which must be in all lowercase without delimiters, such as "aliceblue".#rgb, with hexadecimal representation of color components without regard to case.#rrggbb, with hexadecimal representation of color components without regard to case.rgb(red,green,blue), with decimal representation with a depth of eight bits (0-255).rgb(red%,green%,blue%), with decimal component values multiplied by 100 (0.0-100.0%).rgba(red,green,blue,alpha), with decimal representation with a depth of eight bits (0-255).rgba(red%,green%,blue%,alpha%), with decimal component values multiplied by 100 (0.0%-100.0%).transparent color name as equivalent to rgba(0, 0, 0, 0), or black with zero alpha.
charSequence - The character sequence representation of an RGB color.
java.lang.NullPointerException - if the given string is null.
java.lang.IllegalArgumentException - if a color cannot be determined from the given string.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||