Package com.webfirmframework.wffweb.css
Enum Class CssColorName
- All Implemented Interfaces:
Serializable
,Comparable<CssColorName>
,Constable
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic float
extractOpacity
(String hex) Extracts opacity from the given hex value.int
getB()
int
getG()
getHex()
int
getR()
static CssColorName
gets the corresponding object for the givencolorName
or null for invalid colorName.static boolean
checks whether the given givencolorName
is valid , i.e.toString()
static CssColorName
Returns the enum constant of this class with the specified name.static CssColorName[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALICE_BLUE
-
ANTIQUE_WHITE
-
AQUA
-
AQUAMARINE
-
AZURE
-
BEIGE
-
BISQUE
-
BLACK
-
BLANCHED_ALMOND
-
BLUE
-
BLUE_VIOLET
-
BROWN
-
BURLY_WOOD
-
CADET_BLUE
-
CHARTREUSE
-
CHOCOLATE
-
CORAL
-
CORNFLOWER_BLUE
-
CORNSILK
-
CRIMSON
-
CYAN
-
DARK_BLUE
-
DARK_CYAN
-
DARK_GOLDEN_ROD
-
DARK_GRAY
-
DARK_GREEN
-
DARK_KHAKI
-
DARK_MAGENTA
-
DARK_OLIVE_GREEN
-
DARK_ORANGE
-
DARK_ORCHID
-
DARK_RED
-
DARK_SALMON
-
DARK_SEA_GREEN
-
DARK_SLATE_BLUE
-
DARK_SLATE_GRAY
-
DARK_TURQUOISE
-
DARK_VIOLET
-
DEEP_PINK
-
DEEP_SKY_BLUE
-
DIM_GRAY
-
DODGER_BLUE
-
FIRE_BRICK
-
FLORAL_WHITE
-
FOREST_GREEN
-
FUCHSIA
-
GAINSBORO
-
GHOST_WHITE
-
GOLD
-
GOLDEN_ROD
-
GRAY
-
GREEN
-
GREEN_YELLOW
-
HONEY_DEW
-
HOT_PINK
-
INDIAN_RED
-
INDIGO
-
IVORY
-
KHAKI
-
LAVENDER
-
LAVENDER_BLUSH
-
LAWN_GREEN
-
LEMON_CHIFFON
-
LIGHT_BLUE
-
LIGHT_CORAL
-
LIGHT_CYAN
-
LIGHT_GOLDEN_ROD_YELLOW
-
LIGHT_GRAY
-
LIGHT_GREEN
-
LIGHT_PINK
-
LIGHT_SALMON
-
LIGHT_SEA_GREEN
-
LIGHT_SKY_BLUE
-
LIGHT_SLATE_GRAY
-
LIGHT_STEEL_BLUE
-
LIGHT_YELLOW
-
LIME
-
LIME_GREEN
-
LINEN
-
MAGENTA
-
MAROON
-
MEDIUM_AQUA_MARINE
-
MEDIUM_BLUE
-
MEDIUM_ORCHID
-
MEDIUM_PURPLE
-
MEDIUM_SEA_GREEN
-
MEDIUM_SLATE_BLUE
-
MEDIUM_SPRING_GREEN
-
MEDIUM_TURQUOISE
-
MEDIUM_VIOLET_RED
-
MIDNIGHT_BLUE
-
MINT_CREAM
-
MISTY_ROSE
-
MOCCASIN
-
NAVY
-
OLD_LACE
-
OLIVE
-
OLIVE_DRAB
-
ORANGE
-
ORANGE_RED
-
ORCHID
-
PALE_GREEN
-
PALE_GOLDEN_ROD
-
PALE_TURQUOISE
-
PALE_VIOLET_RED
-
REBECCA_PURPLE
-
NAVAJO_WHITE
-
SPRING_GREEN
-
YELLOW_GREEN
-
PAPAYA_WHIP
-
PEACH_PUFF
-
PERU
-
PINK
-
PLUM
-
POWDER_BLUE
-
PURPLE
-
RED
-
ROSY_BROWN
-
ROYAL_BLUE
-
SADDLE_BROWN
-
SALMON
-
SANDY_BROWN
-
SEA_GREEN
-
SEA_SHELL
-
SIENNA
-
SILVER
-
SKY_BLUE
-
SLATE_BLUE
-
SLATE_GRAY
-
SNOW
-
STEEL_BLUE
-
TAN
-
TEAL
-
THISTLE
-
TOMATO
-
TURQUOISE
-
VIOLET
-
WHEAT
-
WHITE
-
WHITE_SMOKE
-
YELLOW
-
DARK_GREY
-
DARK_SLATE_GREY
-
DIM_GREY
-
GREY
-
LIGHT_GREY
-
LIGHT_SLATE_GREY
-
SLATE_GREY
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getColorName
- Returns:
- the colorName
- Since:
- 1.0.0
-
getHex
- Returns:
- the hex value of the color, eg: for white it will return
#FFFFFF
- Since:
- 3.0.1
-
getR
public int getR()- Returns:
- r value
- Since:
- 3.0.1
-
getG
public int getG()- Returns:
- g value
- Since:
- 3.0.1
-
getB
public int getB()- Returns:
- b value
- Since:
- 3.0.1
-
getEnumName
- Returns:
- the name of this enum.
- Since:
- 1.0.0
-
toString
- Overrides:
toString
in classEnum<CssColorName>
-
isValid
checks whether the given givencolorName
is valid , i.e. whether it can have a corresponding object from it.- Parameters:
colorName
-- Returns:
- true if the given
cssColorName
has a corresponding object. - Since:
- 1.0.0
-
getThis
gets the corresponding object for the givencolorName
or null for invalid colorName.- Parameters:
colorName
- the inbuilt color name as per w3 standard.- Returns:
- the corresponding object for the given
colorName
or null for invalid colorName. - Since:
- 1.0.0
-
extractOpacity
Extracts opacity from the given hex value.- Parameters:
hex
- it must start with #- Returns:
- the opacity value from the given hex. It will also return 1.0 if it doesn't contain alpha value in the given hex value. If the length of hex value is 4 or 7 that means it doesn't contain alpha value in it.
- Since:
- 3.0.10
-