Package ghidra.util
Class WebColors
- java.lang.Object
-
- ghidra.util.WebColors
-
public abstract class WebColors extends java.lang.Object
Class for web color support. This class defines many of the colors used by html. This class includes methods for converting a color to a string (name or hex value) and for converting those strings back to a color.
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.Color
ALICE_BLUE
static java.awt.Color
ANTIQUE_WHITE
static java.awt.Color
AQUA
static java.awt.Color
AQUAMARINE
static java.awt.Color
AZURE
static java.awt.Color
BEIGE
static java.awt.Color
BISQUE
static java.awt.Color
BLACK
static java.awt.Color
BLANCHED_ALMOND
static java.awt.Color
BLUE
static java.awt.Color
BLUE_VIOLET
static java.awt.Color
BROWN
static java.awt.Color
BURLYWOOD
static java.awt.Color
CADET_BLUE
static java.awt.Color
CHARTREUSE
static java.awt.Color
CHOCOLATE
static java.awt.Color
CORAL
static java.awt.Color
CORN_FLOWER_BLUE
static java.awt.Color
CORNSILK
static java.awt.Color
CRIMSON
static java.awt.Color
CYAN
static java.awt.Color
DARK_BLUE
static java.awt.Color
DARK_CYAN
static java.awt.Color
DARK_GOLDENROD
static java.awt.Color
DARK_GRAY
static java.awt.Color
DARK_GREEN
static java.awt.Color
DARK_KHAKI
static java.awt.Color
DARK_MAGENTA
static java.awt.Color
DARK_OLIVE_GREEN
static java.awt.Color
DARK_ORANGE
static java.awt.Color
DARK_ORCHID
static java.awt.Color
DARK_RED
static java.awt.Color
DARK_SALMON
static java.awt.Color
DARK_SEA_GREEN
static java.awt.Color
DARK_SLATE_BLUE
static java.awt.Color
DARK_SLATE_GRAY
static java.awt.Color
DARK_TURQUOSE
static java.awt.Color
DARK_VIOLET
static java.awt.Color
DEEP_PINK
static java.awt.Color
DEEP_SKY_BLUE
static java.awt.Color
DIM_GRAY
static java.awt.Color
DOGER_BLUE
static java.awt.Color
FIRE_BRICK
static java.awt.Color
FLORAL_WHITE
static java.awt.Color
FOREST_GREEN
static java.awt.Color
FUCHSIA
static java.awt.Color
GAINSBORO
static java.awt.Color
GHOST_WHITE
static java.awt.Color
GOLD
static java.awt.Color
GOLDEN_ROD
static java.awt.Color
GRAY
static java.awt.Color
GREEN
static java.awt.Color
GREEN_YELLOW
static java.awt.Color
HONEY_DEW
static java.awt.Color
HOT_PINK
static java.awt.Color
INDIAN_RED
static java.awt.Color
INDIGO
static java.awt.Color
IVORY
static java.awt.Color
KHAKE
static java.awt.Color
LAVENDAR_BLUSH
static java.awt.Color
LAVENDER
static java.awt.Color
LAWN_GREEN
static java.awt.Color
LEMON_CHIFFON
static java.awt.Color
LIGHT_BLUE
static java.awt.Color
LIGHT_CORAL
static java.awt.Color
LIGHT_CYAN
static java.awt.Color
LIGHT_GOLDENROD
static java.awt.Color
LIGHT_GRAY
static java.awt.Color
LIGHT_GREEN
static java.awt.Color
LIGHT_PINK
static java.awt.Color
LIGHT_SALMON
static java.awt.Color
LIGHT_SEA_GREEN
static java.awt.Color
LIGHT_SKY_BLUE
static java.awt.Color
LIGHT_SLATE_GRAY
static java.awt.Color
LIGHT_STEEL_BLUE
static java.awt.Color
LIGHT_YELLOW
static java.awt.Color
LIME
static java.awt.Color
LIME_GREEN
static java.awt.Color
LINEN
static java.awt.Color
MAGENTA
static java.awt.Color
MAROON
static java.awt.Color
MEDIUM_BLUE
static java.awt.Color
MEDIUM_ORCHID
static java.awt.Color
MEDIUM_PURPLE
static java.awt.Color
MEDIUM_SEA_GREEN
static java.awt.Color
MEDIUM_SLATE_BLUE
static java.awt.Color
MEDIUM_SPRING_GREEN
static java.awt.Color
MEDIUM_TURQOISE
static java.awt.Color
MEDIUM_VIOLET_RED
static java.awt.Color
MEDUM_AQUA_MARINE
static java.awt.Color
MIDNIGHT_BLUE
static java.awt.Color
MINT_CREAM
static java.awt.Color
MISTY_ROSE
static java.awt.Color
MOCCASIN
static java.awt.Color
NAVAJO_WHITE
static java.awt.Color
NAVY
static java.awt.Color
OLDLACE
static java.awt.Color
OLIVE
static java.awt.Color
OLIVE_DRAB
static java.awt.Color
ORANGE
static java.awt.Color
ORANGE_RED
static java.awt.Color
ORCHID
static java.awt.Color
PALE_GOLDENROD
static java.awt.Color
PALE_GREEN
static java.awt.Color
PALE_TURQUOISE
static java.awt.Color
PALE_VIOLET_RED
static java.awt.Color
PAPAYA_WHIP
static java.awt.Color
PEACH_PUFF
static java.awt.Color
PERU
static java.awt.Color
PINK
static java.awt.Color
PLUM
static java.awt.Color
POWDER_BLUE
static java.awt.Color
PURPLE
static java.awt.Color
REBECCA_PURPLE
static java.awt.Color
RED
static java.awt.Color
ROSY_BROWN
static java.awt.Color
ROYAL_BLUE
static java.awt.Color
SADDLE_BROWN
static java.awt.Color
SALMON
static java.awt.Color
SANDY_BROWN
static java.awt.Color
SEA_GREEN
static java.awt.Color
SEASHELL
static java.awt.Color
SIENNA
static java.awt.Color
SILVER
static java.awt.Color
SLATE_BLUE
static java.awt.Color
SLATE_GRAY
static java.awt.Color
SNOW
static java.awt.Color
SPRING_GREEN
static java.awt.Color
STEEL_BLUE
static java.awt.Color
SYY_BLUE
static java.awt.Color
TAN
static java.awt.Color
TEAL
static java.awt.Color
THISTLE
static java.awt.Color
TOMATO
static java.awt.Color
TURQUOISE
static java.awt.Color
VIOLET
static java.awt.Color
WHEAT
static java.awt.Color
WHITE
static java.awt.Color
WHITE_SMOKE
static java.awt.Color
YELLOW
static java.awt.Color
YELLOW_GREEN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Color
getColor(java.lang.String value)
Tries to find a color for the given String value.static java.awt.Color
getColorOrDefault(java.lang.String value, java.awt.Color defaultColor)
Tries to find a color for the given String value.static java.lang.String
toString(java.awt.Color color)
Converts a color to a string value.
-
-
-
Field Detail
-
BLACK
public static final java.awt.Color BLACK
-
NAVY
public static final java.awt.Color NAVY
-
DARK_BLUE
public static final java.awt.Color DARK_BLUE
-
MEDIUM_BLUE
public static final java.awt.Color MEDIUM_BLUE
-
BLUE
public static final java.awt.Color BLUE
-
DARK_GREEN
public static final java.awt.Color DARK_GREEN
-
GREEN
public static final java.awt.Color GREEN
-
TEAL
public static final java.awt.Color TEAL
-
DARK_CYAN
public static final java.awt.Color DARK_CYAN
-
DEEP_SKY_BLUE
public static final java.awt.Color DEEP_SKY_BLUE
-
DARK_TURQUOSE
public static final java.awt.Color DARK_TURQUOSE
-
LIME
public static final java.awt.Color LIME
-
SPRING_GREEN
public static final java.awt.Color SPRING_GREEN
-
AQUA
public static final java.awt.Color AQUA
-
CYAN
public static final java.awt.Color CYAN
-
MIDNIGHT_BLUE
public static final java.awt.Color MIDNIGHT_BLUE
-
DOGER_BLUE
public static final java.awt.Color DOGER_BLUE
-
LIGHT_SEA_GREEN
public static final java.awt.Color LIGHT_SEA_GREEN
-
FOREST_GREEN
public static final java.awt.Color FOREST_GREEN
-
SEA_GREEN
public static final java.awt.Color SEA_GREEN
-
DARK_SLATE_GRAY
public static final java.awt.Color DARK_SLATE_GRAY
-
LIME_GREEN
public static final java.awt.Color LIME_GREEN
-
TURQUOISE
public static final java.awt.Color TURQUOISE
-
ROYAL_BLUE
public static final java.awt.Color ROYAL_BLUE
-
STEEL_BLUE
public static final java.awt.Color STEEL_BLUE
-
DARK_SLATE_BLUE
public static final java.awt.Color DARK_SLATE_BLUE
-
INDIGO
public static final java.awt.Color INDIGO
-
CADET_BLUE
public static final java.awt.Color CADET_BLUE
-
REBECCA_PURPLE
public static final java.awt.Color REBECCA_PURPLE
-
DIM_GRAY
public static final java.awt.Color DIM_GRAY
-
SLATE_BLUE
public static final java.awt.Color SLATE_BLUE
-
OLIVE_DRAB
public static final java.awt.Color OLIVE_DRAB
-
SLATE_GRAY
public static final java.awt.Color SLATE_GRAY
-
LAWN_GREEN
public static final java.awt.Color LAWN_GREEN
-
CHARTREUSE
public static final java.awt.Color CHARTREUSE
-
AQUAMARINE
public static final java.awt.Color AQUAMARINE
-
MAROON
public static final java.awt.Color MAROON
-
PURPLE
public static final java.awt.Color PURPLE
-
OLIVE
public static final java.awt.Color OLIVE
-
GRAY
public static final java.awt.Color GRAY
-
SYY_BLUE
public static final java.awt.Color SYY_BLUE
-
LIGHT_SKY_BLUE
public static final java.awt.Color LIGHT_SKY_BLUE
-
BLUE_VIOLET
public static final java.awt.Color BLUE_VIOLET
-
DARK_RED
public static final java.awt.Color DARK_RED
-
DARK_MAGENTA
public static final java.awt.Color DARK_MAGENTA
-
SADDLE_BROWN
public static final java.awt.Color SADDLE_BROWN
-
DARK_SEA_GREEN
public static final java.awt.Color DARK_SEA_GREEN
-
LIGHT_GREEN
public static final java.awt.Color LIGHT_GREEN
-
MEDIUM_PURPLE
public static final java.awt.Color MEDIUM_PURPLE
-
DARK_VIOLET
public static final java.awt.Color DARK_VIOLET
-
PALE_GREEN
public static final java.awt.Color PALE_GREEN
-
DARK_ORCHID
public static final java.awt.Color DARK_ORCHID
-
YELLOW_GREEN
public static final java.awt.Color YELLOW_GREEN
-
SIENNA
public static final java.awt.Color SIENNA
-
BROWN
public static final java.awt.Color BROWN
-
DARK_GRAY
public static final java.awt.Color DARK_GRAY
-
LIGHT_BLUE
public static final java.awt.Color LIGHT_BLUE
-
GREEN_YELLOW
public static final java.awt.Color GREEN_YELLOW
-
PALE_TURQUOISE
public static final java.awt.Color PALE_TURQUOISE
-
POWDER_BLUE
public static final java.awt.Color POWDER_BLUE
-
FIRE_BRICK
public static final java.awt.Color FIRE_BRICK
-
DARK_GOLDENROD
public static final java.awt.Color DARK_GOLDENROD
-
MEDIUM_ORCHID
public static final java.awt.Color MEDIUM_ORCHID
-
ROSY_BROWN
public static final java.awt.Color ROSY_BROWN
-
DARK_KHAKI
public static final java.awt.Color DARK_KHAKI
-
SILVER
public static final java.awt.Color SILVER
-
INDIAN_RED
public static final java.awt.Color INDIAN_RED
-
PERU
public static final java.awt.Color PERU
-
CHOCOLATE
public static final java.awt.Color CHOCOLATE
-
TAN
public static final java.awt.Color TAN
-
LIGHT_GRAY
public static final java.awt.Color LIGHT_GRAY
-
THISTLE
public static final java.awt.Color THISTLE
-
ORCHID
public static final java.awt.Color ORCHID
-
GOLDEN_ROD
public static final java.awt.Color GOLDEN_ROD
-
PALE_VIOLET_RED
public static final java.awt.Color PALE_VIOLET_RED
-
CRIMSON
public static final java.awt.Color CRIMSON
-
GAINSBORO
public static final java.awt.Color GAINSBORO
-
PLUM
public static final java.awt.Color PLUM
-
BURLYWOOD
public static final java.awt.Color BURLYWOOD
-
LIGHT_CYAN
public static final java.awt.Color LIGHT_CYAN
-
LAVENDER
public static final java.awt.Color LAVENDER
-
DARK_SALMON
public static final java.awt.Color DARK_SALMON
-
VIOLET
public static final java.awt.Color VIOLET
-
PALE_GOLDENROD
public static final java.awt.Color PALE_GOLDENROD
-
LIGHT_CORAL
public static final java.awt.Color LIGHT_CORAL
-
KHAKE
public static final java.awt.Color KHAKE
-
ALICE_BLUE
public static final java.awt.Color ALICE_BLUE
-
HONEY_DEW
public static final java.awt.Color HONEY_DEW
-
AZURE
public static final java.awt.Color AZURE
-
SANDY_BROWN
public static final java.awt.Color SANDY_BROWN
-
WHEAT
public static final java.awt.Color WHEAT
-
BEIGE
public static final java.awt.Color BEIGE
-
WHITE_SMOKE
public static final java.awt.Color WHITE_SMOKE
-
MINT_CREAM
public static final java.awt.Color MINT_CREAM
-
GHOST_WHITE
public static final java.awt.Color GHOST_WHITE
-
SALMON
public static final java.awt.Color SALMON
-
ANTIQUE_WHITE
public static final java.awt.Color ANTIQUE_WHITE
-
LINEN
public static final java.awt.Color LINEN
-
OLDLACE
public static final java.awt.Color OLDLACE
-
RED
public static final java.awt.Color RED
-
FUCHSIA
public static final java.awt.Color FUCHSIA
-
MAGENTA
public static final java.awt.Color MAGENTA
-
DEEP_PINK
public static final java.awt.Color DEEP_PINK
-
ORANGE_RED
public static final java.awt.Color ORANGE_RED
-
TOMATO
public static final java.awt.Color TOMATO
-
HOT_PINK
public static final java.awt.Color HOT_PINK
-
CORAL
public static final java.awt.Color CORAL
-
DARK_ORANGE
public static final java.awt.Color DARK_ORANGE
-
LIGHT_SALMON
public static final java.awt.Color LIGHT_SALMON
-
ORANGE
public static final java.awt.Color ORANGE
-
LIGHT_PINK
public static final java.awt.Color LIGHT_PINK
-
PINK
public static final java.awt.Color PINK
-
GOLD
public static final java.awt.Color GOLD
-
PEACH_PUFF
public static final java.awt.Color PEACH_PUFF
-
NAVAJO_WHITE
public static final java.awt.Color NAVAJO_WHITE
-
MOCCASIN
public static final java.awt.Color MOCCASIN
-
BISQUE
public static final java.awt.Color BISQUE
-
MISTY_ROSE
public static final java.awt.Color MISTY_ROSE
-
BLANCHED_ALMOND
public static final java.awt.Color BLANCHED_ALMOND
-
PAPAYA_WHIP
public static final java.awt.Color PAPAYA_WHIP
-
LAVENDAR_BLUSH
public static final java.awt.Color LAVENDAR_BLUSH
-
SEASHELL
public static final java.awt.Color SEASHELL
-
CORNSILK
public static final java.awt.Color CORNSILK
-
LEMON_CHIFFON
public static final java.awt.Color LEMON_CHIFFON
-
FLORAL_WHITE
public static final java.awt.Color FLORAL_WHITE
-
SNOW
public static final java.awt.Color SNOW
-
YELLOW
public static final java.awt.Color YELLOW
-
LIGHT_YELLOW
public static final java.awt.Color LIGHT_YELLOW
-
IVORY
public static final java.awt.Color IVORY
-
WHITE
public static final java.awt.Color WHITE
-
MEDIUM_SPRING_GREEN
public static final java.awt.Color MEDIUM_SPRING_GREEN
-
LIGHT_GOLDENROD
public static final java.awt.Color LIGHT_GOLDENROD
-
MEDIUM_VIOLET_RED
public static final java.awt.Color MEDIUM_VIOLET_RED
-
LIGHT_STEEL_BLUE
public static final java.awt.Color LIGHT_STEEL_BLUE
-
LIGHT_SLATE_GRAY
public static final java.awt.Color LIGHT_SLATE_GRAY
-
MEDIUM_SLATE_BLUE
public static final java.awt.Color MEDIUM_SLATE_BLUE
-
MEDIUM_SEA_GREEN
public static final java.awt.Color MEDIUM_SEA_GREEN
-
MEDUM_AQUA_MARINE
public static final java.awt.Color MEDUM_AQUA_MARINE
-
MEDIUM_TURQOISE
public static final java.awt.Color MEDIUM_TURQOISE
-
DARK_OLIVE_GREEN
public static final java.awt.Color DARK_OLIVE_GREEN
-
CORN_FLOWER_BLUE
public static final java.awt.Color CORN_FLOWER_BLUE
-
-
Method Detail
-
getColorOrDefault
public static java.awt.Color getColorOrDefault(java.lang.String value, java.awt.Color defaultColor)
Tries to find a color for the given String value. The String value can either be a hex string (seeColor.decode(String)
) or a web color name as defined above- Parameters:
value
- the string value to interpret as a colordefaultColor
- a default color to return if the string can't be converted to a color- Returns:
- a color for the given string value or the default color if the string can't be translated
-
getColor
public static java.awt.Color getColor(java.lang.String value)
Tries to find a color for the given String value. The String value can either be a hex string (seeColor.decode(String)
) or a web color name as defined inWebColors
- Parameters:
value
- the string value to interpret as a color- Returns:
- a color for the given string value or null if the string can't be translated
-
toString
public static java.lang.String toString(java.awt.Color color)
Converts a color to a string value. If there is a defined color for the given color value, the color name will be returned. Otherwise, it will return a hex string for the color as defined byColor.toString()
. The result of this call can be passed togetColor(String)
and be guaranteed that a color will be returned- Parameters:
color
- the color to convert to a string.- Returns:
- the string representation for the given color.
-
-