|
SimpleServlets v5.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.simpleservlets.htmlobjects.HTMLColor
public final class HTMLColor
Used to represent a color for HTML. All colors are rendered in HTML pages in the #RRGGBB format (including the #). There are many constant values defined which can be handily accessed in Java code by their names, but end up being in #RRGGBB format in HTML so that they are universally understood by browsers. Instances of this class are immutable and may be safely shared.
Names and shades of the colors can be viewed at w3schools.com (the source used for these definitions).
| Field Summary | |
|---|---|
static HTMLColor |
ALICE_BLUE
The color 'Alice Blue'. |
static HTMLColor |
ANTIQUE_WHITE
The color 'Antique White'. |
static HTMLColor |
AQUA
The color 'Aqua'. |
static HTMLColor |
AQUAMARINE
The color 'Aquamarine'. |
static HTMLColor |
AZURE
The color 'Azure'. |
static HTMLColor |
BEIGE
The color 'Beige'. |
static HTMLColor |
BISQUE
The color 'Bisque'. |
static HTMLColor |
BLACK
The color 'Black'. |
static HTMLColor |
BLANCHED_ALMOND
The color 'Blanched Almond'. |
static HTMLColor |
BLUE
The color 'Blue'. |
static HTMLColor |
BLUE_VIOLET
The color 'Blue Violet'. |
static HTMLColor |
BROWN
The color 'Brown'. |
static HTMLColor |
BURLY_WOOD
The color 'Burly Wood'. |
static HTMLColor |
CADET_BLUE
The color 'Cadet Blue'. |
static HTMLColor |
CHARTREUSE
The color 'Chartreuse'. |
static HTMLColor |
CHOCOLATE
The color 'Chocolate'. |
static HTMLColor |
CORAL
The color 'Coral'. |
static HTMLColor |
CORNFLOWER_BLUE
The color 'Cornflower Blue'. |
static HTMLColor |
CORNSILK
The color 'Cornsilk'. |
static HTMLColor |
CRIMSON
The color 'Crimson'. |
static HTMLColor |
CYAN
The color 'Cyan'. |
static HTMLColor |
DARK_BLUE
The color 'Dark Blue'. |
static HTMLColor |
DARK_CYAN
The color 'Dark Cyan'. |
static HTMLColor |
DARK_GOLDEN_ROD
The color 'Dark Golden Rod'. |
static HTMLColor |
DARK_GRAY
The color 'Dark Gray'. |
static HTMLColor |
DARK_GREEN
The color 'Dark Green'. |
static HTMLColor |
DARK_KHAKI
The color 'Dark Khaki'. |
static HTMLColor |
DARK_MAGENTA
The color 'Dark Magenta'. |
static HTMLColor |
DARK_OLIVE_GREEN
The color 'Dark Olive Green'. |
static HTMLColor |
DARK_ORCHID
The color 'Dark Orchid'. |
static HTMLColor |
DARK_RED
The color 'Dark Red'. |
static HTMLColor |
DARK_SALMON
The color 'Dark Salmon'. |
static HTMLColor |
DARK_SEA_GREEN
The color 'Dark Sea Green'. |
static HTMLColor |
DARK_SLATE_BLUE
The color 'Dark Slate Blue'. |
static HTMLColor |
DARK_SLATE_GRAY
The color 'Dark Slate Gray'. |
static HTMLColor |
DARK_TURQUOISE
The color 'Dark Turquoise'. |
static HTMLColor |
DARK_VIOLET
The color 'Dark Violet'. |
static HTMLColor |
DARKORANGE
The color 'Darkorange'. |
static HTMLColor |
DEEP_PINK
The color 'Deep Pink'. |
static HTMLColor |
DEEP_SKY_BLUE
The color 'Deep Sky Blue'. |
static HTMLColor |
DIM_GRAY
The color 'Dim Gray'. |
static HTMLColor |
DODGER_BLUE
The color 'Dodger Blue'. |
static HTMLColor |
FELDSPAR
The color 'Feldspar'. |
static HTMLColor |
FIRE_BRICK
The color 'Fire Brick'. |
static HTMLColor |
FLORAL_WHITE
The color 'Floral White'. |
static HTMLColor |
FOREST_GREEN
The color 'Forest Green'. |
static HTMLColor |
FUCHSIA
The color 'Fuchsia'. |
static HTMLColor |
GAINSBORO
The color 'Gainsboro'. |
static HTMLColor |
GHOST_WHITE
The color 'Ghost White'. |
static HTMLColor |
GOLD
The color 'Gold'. |
static HTMLColor |
GOLDEN_ROD
The color 'Golden Rod'. |
static HTMLColor |
GRAY
The color 'Gray'. |
static HTMLColor |
GREEN
The color 'Green'. |
static HTMLColor |
GREEN_YELLOW
The color 'Green Yellow'. |
static HTMLColor |
HONEY_DEW
The color 'Honey Dew'. |
static HTMLColor |
HOT_PINK
The color 'Hot Pink'. |
static HTMLColor |
INDIAN_RED
The color 'Indian Red'. |
static HTMLColor |
INDIGO
The color 'Indigo'. |
static HTMLColor |
IVORY
The color 'Ivory'. |
static HTMLColor |
KHAKI
The color 'Khaki'. |
static HTMLColor |
LAVENDER
The color 'Lavender'. |
static HTMLColor |
LAVENDER_BLUSH
The color 'Lavender Blush'. |
static HTMLColor |
LAWN_GREEN
The color 'Lawn Green'. |
static HTMLColor |
LEMON_CHIFFON
The color 'Lemon Chiffon'. |
static HTMLColor |
LIGHT_BLUE
The color 'Light Blue'. |
static HTMLColor |
LIGHT_CORAL
The color 'Light Coral'. |
static HTMLColor |
LIGHT_CYAN
The color 'Light Cyan'. |
static HTMLColor |
LIGHT_GOLDEN_ROD_YELLOW
The color 'Light Golden Rod Yellow'. |
static HTMLColor |
LIGHT_GREEN
The color 'Light Green'. |
static HTMLColor |
LIGHT_GREY
The color 'Light Grey'. |
static HTMLColor |
LIGHT_PINK
The color 'Light Pink'. |
static HTMLColor |
LIGHT_SALMON
The color 'Light Salmon'. |
static HTMLColor |
LIGHT_SEA_GREEN
The color 'Light Sea Green'. |
static HTMLColor |
LIGHT_SKY_BLUE
The color 'Light Sky Blue'. |
static HTMLColor |
LIGHT_SLATE_BLUE
The color 'Light Slate Blue'. |
static HTMLColor |
LIGHT_SLATE_GRAY
The color 'Light Slate Gray'. |
static HTMLColor |
LIGHT_STEEL_BLUE
The color 'Light Steel Blue'. |
static HTMLColor |
LIGHT_YELLOW
The color 'Light Yellow'. |
static HTMLColor |
LIME
The color 'Lime'. |
static HTMLColor |
LIME_GREEN
The color 'Lime Green'. |
static HTMLColor |
LINEN
The color 'Linen'. |
static HTMLColor |
MAGENTA
The color 'Magenta'. |
static HTMLColor |
MAROON
The color 'Maroon'. |
static HTMLColor |
MEDIUM_AQUA_MARINE
The color 'Medium Aqua Marine'. |
static HTMLColor |
MEDIUM_BLUE
The color 'Medium Blue'. |
static HTMLColor |
MEDIUM_ORCHID
The color 'Medium Orchid'. |
static HTMLColor |
MEDIUM_PURPLE
The color 'Medium Purple'. |
static HTMLColor |
MEDIUM_SEA_GREEN
The color 'Medium Sea Green'. |
static HTMLColor |
MEDIUM_SLATE_BLUE
The color 'Medium Slate Blue'. |
static HTMLColor |
MEDIUM_SPRING_GREEN
The color 'Medium Spring Green'. |
static HTMLColor |
MEDIUM_TURQUOISE
The color 'Medium Turquoise'. |
static HTMLColor |
MEDIUM_VIOLET_RED
The color 'Medium Violet Red'. |
static HTMLColor |
MIDNIGHT_BLUE
The color 'Midnight Blue'. |
static HTMLColor |
MINT_CREAM
The color 'Mint Cream'. |
static HTMLColor |
MISTY_ROSE
The color 'Misty Rose'. |
static HTMLColor |
MOCCASIN
The color 'Moccasin'. |
static HTMLColor |
NAVAJO_WHITE
The color 'Navajo White'. |
static HTMLColor |
NAVY
The color 'Navy'. |
static HTMLColor |
OLD_LACE
The color 'Old Lace'. |
static HTMLColor |
OLIVE
The color 'Olive'. |
static HTMLColor |
OLIVE_DRAB
The color 'Olive Drab'. |
static HTMLColor |
ORANGE
The color 'Orange'. |
static HTMLColor |
ORANGE_RED
The color 'Orange Red'. |
static HTMLColor |
ORCHID
The color 'Orchid'. |
static HTMLColor |
PALE_GOLDEN_ROD
The color 'Pale Golden Rod'. |
static HTMLColor |
PALE_GREEN
The color 'Pale Green'. |
static HTMLColor |
PALE_TURQUOISE
The color 'Pale Turquoise'. |
static HTMLColor |
PALE_VIOLET_RED
The color 'Pale Violet Red'. |
static HTMLColor |
PAPAYA_WHIP
The color 'Papaya Whip'. |
static HTMLColor |
PEACH_PUFF
The color 'Peach Puff'. |
static HTMLColor |
PERU
The color 'Peru'. |
static HTMLColor |
PINK
The color 'Pink'. |
static HTMLColor |
PLUM
The color 'Plum'. |
static HTMLColor |
POWDER_BLUE
The color 'Powder Blue'. |
static HTMLColor |
PURPLE
The color 'Purple'. |
static HTMLColor |
RED
The color 'Red'. |
static HTMLColor |
ROSY_BROWN
The color 'Rosy Brown'. |
static HTMLColor |
ROYAL_BLUE
The color 'Royal Blue'. |
static HTMLColor |
SADDLE_BROWN
The color 'Saddle Brown'. |
static HTMLColor |
SALMON
The color 'Salmon'. |
static HTMLColor |
SANDY_BROWN
The color 'Sandy Brown'. |
static HTMLColor |
SEA_GREEN
The color 'Sea Green'. |
static HTMLColor |
SEA_SHELL
The color 'Sea Shell'. |
static HTMLColor |
SIENNA
The color 'Sienna'. |
static HTMLColor |
SILVER
The color 'Silver'. |
static HTMLColor |
SKY_BLUE
The color 'Sky Blue'. |
static HTMLColor |
SLATE_BLUE
The color 'Slate Blue'. |
static HTMLColor |
SLATE_GRAY
The color 'Slate Gray'. |
static HTMLColor |
SNOW
The color 'Snow'. |
static HTMLColor |
SPRING_GREEN
The color 'Spring Green'. |
static HTMLColor |
STEEL_BLUE
The color 'Steel Blue'. |
static HTMLColor |
TAN
The color 'Tan'. |
static HTMLColor |
TEAL
The color 'Teal'. |
static HTMLColor |
THISTLE
The color 'Thistle'. |
static HTMLColor |
TOMATO
The color 'Tomato'. |
static HTMLColor |
TURQUOISE
The color 'Turquoise'. |
static HTMLColor |
VIOLET
The color 'Violet'. |
static HTMLColor |
VIOLET_RED
The color 'Violet Red'. |
static HTMLColor |
WHEAT
The color 'Wheat'. |
static HTMLColor |
WHITE
The color 'White'. |
static HTMLColor |
WHITE_SMOKE
The color 'White Smoke'. |
static HTMLColor |
YELLOW
The color 'Yellow'. |
static HTMLColor |
YELLOW_GREEN
The color 'Yellow Green'. |
| Constructor Summary | |
|---|---|
HTMLColor(Color awtColor)
|
|
HTMLColor(double red,
double green,
double blue)
Specify the amount of red, green, and blue as double. |
|
HTMLColor(int red,
int green,
int blue)
Specify the amount of red, green, and blue as int. |
|
HTMLColor(String color)
Create a new color. |
|
HTMLColor(String color,
String javaName,
String htmlName,
String displayName)
Create a new color. |
|
| Method Summary | |
|---|---|
static String |
awtColorToHex(Color awtColor)
Takes the AWT color and produces a #RRGGBB string representation. |
static HTMLColor |
getColorForName(String name)
Normalizes the passed name and returns the HTMLColor stored under that name (if any). |
String |
getDisplayName()
Returns the name of this color in a very human normal form (with mixed case and spaces between words). |
String |
getHexValue()
Returns the color as a #RRGGBB string. |
String |
getHtmlName()
Returns the name of this color as defined by HTML (with mixed case and no spaces between words). |
String |
getJavaName()
Returns the name of this color as defined by a Java constant (with all capital letters and underscores between words). |
static String |
normalizeName(String name)
Returns the name with non-alpha characters stripped and all others turned to capitals. |
String |
toString()
Returns the color as a #RRGGBB string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final HTMLColor ALICE_BLUE
|
|
|
|
public static final HTMLColor ANTIQUE_WHITE
|
|
|
|
public static final HTMLColor AQUA
|
|
|
|
public static final HTMLColor AQUAMARINE
|
|
|
|
public static final HTMLColor AZURE
|
|
|
|
public static final HTMLColor BEIGE
|
|
|
|
public static final HTMLColor BISQUE
|
|
|
|
public static final HTMLColor BLACK
|
|
|
|
public static final HTMLColor BLANCHED_ALMOND
|
|
|
|
public static final HTMLColor BLUE
|
|
|
|
public static final HTMLColor BLUE_VIOLET
|
|
|
|
public static final HTMLColor BROWN
|
|
|
|
public static final HTMLColor BURLY_WOOD
|
|
|
|
public static final HTMLColor CADET_BLUE
|
|
|
|
public static final HTMLColor CHARTREUSE
|
|
|
|
public static final HTMLColor CHOCOLATE
|
|
|
|
public static final HTMLColor CORAL
|
|
|
|
public static final HTMLColor CORNFLOWER_BLUE
|
|
|
|
public static final HTMLColor CORNSILK
|
|
|
|
public static final HTMLColor CRIMSON
|
|
|
|
public static final HTMLColor CYAN
|
|
|
|
public static final HTMLColor DARK_BLUE
|
|
|
|
public static final HTMLColor DARK_CYAN
|
|
|
|
public static final HTMLColor DARK_GOLDEN_ROD
|
|
|
|
public static final HTMLColor DARK_GRAY
|
|
|
|
public static final HTMLColor DARK_GREEN
|
|
|
|
public static final HTMLColor DARK_KHAKI
|
|
|
|
public static final HTMLColor DARK_MAGENTA
|
|
|
|
public static final HTMLColor DARK_OLIVE_GREEN
|
|
|
|
public static final HTMLColor DARKORANGE
|
|
|
|
public static final HTMLColor DARK_ORCHID
|
|
|
|
public static final HTMLColor DARK_RED
|
|
|
|
public static final HTMLColor DARK_SALMON
|
|
|
|
public static final HTMLColor DARK_SEA_GREEN
|
|
|
|
public static final HTMLColor DARK_SLATE_BLUE
|
|
|
|
public static final HTMLColor DARK_SLATE_GRAY
|
|
|
|
public static final HTMLColor DARK_TURQUOISE
|
|
|
|
public static final HTMLColor DARK_VIOLET
|
|
|
|
public static final HTMLColor DEEP_PINK
|
|
|
|
public static final HTMLColor DEEP_SKY_BLUE
|
|
|
|
public static final HTMLColor DIM_GRAY
|
|
|