Package io.deephaven.gui.color
Enum Class Colors
- All Implemented Interfaces:
Serializable
,Comparable<Colors>
,java.lang.constant.Constable
Pre-defined
Color
s available by name.
The colors are the named colors commonly supported by HTML browsers.
Methods and colors moved from DBColorUtil to here. They are left in ColorUtil for backward compatibility. TODO
(deephaven/deephaven-core/issues/175): Move this to a new module and package-
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 long
background
(long color) Creates a table format encoding with specified background color and an unformatted foreground.static long
background
(long r, long g, long b) Creates a table format encoding with background color equal to the input RGB and unformatted foreground.static long
backgroundForeground
(long bgr, long bgg, long bgb, long fgr, long fgg, long fgb) Creates a table format encoding with specified foreground and background colors.static long
backgroundForegroundAuto
(long bgr, long bgg, long bgb) Creates a table format encoding with specified background color and automatically chosen contrasting foreground color.static long
bg
(long color) Convenience method forbackground(long)
static long
bg
(long r, long g, long b) Convenience method forbackground(long, long, long)
.static long
bgfg
(long bgr, long bgg, long bgb, long fgr, long fgg, long fgb) Convenience method forbackgroundForeground(long, long, long, long, long, long)
static long
bgfga
(long bgr, long bgg, long bgb) Convenience method forbackgroundForegroundAuto(long, long, long)
color()
Gets this name's definedColor
static long
fg
(long color) Convenience method forforeground(long)
static long
fg
(long r, long g, long b) Convenience method forforeground(long, long, long)
.static long
foreground
(long color) Creates a table format encoding with specified foreground color and unformatted background.static long
foreground
(long r, long g, long b) Creates a table format encoding with foreground color equal to the input RGB and unformatted background.long
format()
Gets this name's defined column format valuestatic long
heatmap
(double value, double min, double max, long bg1, long bg2) Creates a table format encoding for the heat map atvalue
.static long
heatmapFg
(double value, double min, double max, long fg1, long fg2) Convenience method forheatmapForeground(double, double, double, long, long)
static long
heatmapForeground
(double value, double min, double max, long fg1, long fg2) Creates a table format encoding with specified foreground color and unformatted background.static long
toLong
(long color) Gets the formatting long of the input colorstatic long
Gets the formatting long of the input colorstatic long
Gets the formatting long of the input colorstatic long
Gets the formatting long of the input colorstatic Colors
Returns the enum constant of this class with the specified name.static Colors[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALICEBLUE
-
ANTIQUEWHITE
-
AQUA
-
AQUAMARINE
-
AZURE
-
BEIGE
-
BISQUE
-
BLACK
-
BLANCHEDALMOND
-
BLUE
-
BLUEVIOLET
-
BROWN
-
BURLYWOOD
-
CADETBLUE
-
CHARTREUSE
-
CHOCOLATE
-
CORAL
-
CORNFLOWERBLUE
-
CORNSILK
-
CRIMSON
-
CYAN
-
DARKBLUE
-
DARKCYAN
-
DARKGOLDENROD
-
DARKGRAY
-
DARKGREY
-
DARKGREEN
-
DARKKHAKI
-
DARKMAGENTA
-
DARKOLIVEGREEN
-
DARKORANGE
-
DARKORCHID
-
DARKRED
-
DARKSALMON
-
DARKSEAGREEN
-
DARKSLATEBLUE
-
DARKSLATEGRAY
-
DARKSLATEGREY
-
DARKTURQUOISE
-
DARKVIOLET
-
DEEPPINK
-
DEEPSKYBLUE
-
DIMGRAY
-
DIMGREY
-
DODGERBLUE
-
FIREBRICK
-
FLORALWHITE
-
FORESTGREEN
-
FUCHSIA
-
GAINSBORO
-
GHOSTWHITE
-
GOLD
-
GOLDENROD
-
GRAY
-
GREY
-
GREEN
-
GREENYELLOW
-
HONEYDEW
-
HOTPINK
-
INDIANRED
-
INDIGO
-
IVORY
-
KHAKI
-
LAVENDER
-
LAVENDERBLUSH
-
LAWNGREEN
-
LEMONCHIFFON
-
LIGHTBLUE
-
LIGHTCORAL
-
LIGHTCYAN
-
LIGHTGOLDENRODYELLOW
-
LIGHTGRAY
-
LIGHTGREY
-
LIGHTGREEN
-
LIGHTPINK
-
LIGHTSALMON
-
LIGHTSEAGREEN
-
LIGHTSKYBLUE
-
LIGHTSLATEGRAY
-
LIGHTSLATEGREY
-
LIGHTSTEELBLUE
-
LIGHTYELLOW
-
LIME
-
LIMEGREEN
-
LINEN
-
MAGENTA
-
MAROON
-
MEDIUMAQUAMARINE
-
MEDIUMBLUE
-
MEDIUMORCHID
-
MEDIUMPURPLE
-
MEDIUMSEAGREEN
-
MEDIUMSLATEBLUE
-
MEDIUMSPRINGGREEN
-
MEDIUMTURQUOISE
-
MEDIUMVIOLETRED
-
MIDNIGHTBLUE
-
MINTCREAM
-
MISTYROSE
-
MOCCASIN
-
NAVAJOWHITE
-
NAVY
-
OLDLACE
-
OLIVE
-
OLIVEDRAB
-
ORANGE
-
ORANGERED
-
ORCHID
-
PALEGOLDENROD
-
PALEGREEN
-
PALETURQUOISE
-
PALEVIOLETRED
-
PAPAYAWHIP
-
PEACHPUFF
-
PERU
-
PINK
-
PLUM
-
POWDERBLUE
-
PURPLE
-
REBECCAPURPLE
-
RED
-
ROSYBROWN
-
ROYALBLUE
-
SADDLEBROWN
-
SALMON
-
SANDYBROWN
-
SEAGREEN
-
SEASHELL
-
SIENNA
-
SILVER
-
SKYBLUE
-
SLATEBLUE
-
SLATEGRAY
-
SLATEGREY
-
SNOW
-
SPRINGGREEN
-
STEELBLUE
-
TAN
-
TEAL
-
THISTLE
-
TOMATO
-
TURQUOISE
-
VIOLET
-
WHEAT
-
WHITE
-
WHITESMOKE
-
YELLOW
-
YELLOWGREEN
-
VIVID_RED
-
VIVID_YELLOWRED
-
VIVID_YELLOW
-
VIVID_GREENYELLOW
-
VIVID_GREEN
-
VIVID_BLUEGREEN
-
VIVID_BLUE
-
VIVID_PURPLEBLUE
-
VIVID_PURPLE
-
VIVID_REDPURPLE
-
STRONG_RED
-
STRONG_YELLOWRED
-
STRONG_YELLOW
-
STRONG_GREENYELLOW
-
STRONG_GREEN
-
STRONG_BLUEGREEN
-
STRONG_BLUE
-
STRONG_PURPLEBLUE
-
STRONG_PURPLE
-
STRONG_REDPURPLE
-
BRIGHT_RED
-
BRIGHT_YELLOWRED
-
BRIGHT_YELLOW
-
BRIGHT_GREENYELLOW
-
BRIGHT_GREEN
-
BRIGHT_BLUEGREEN
-
BRIGHT_BLUE
-
BRIGHT_PURPLEBLUE
-
BRIGHT_PURPLE
-
BRIGHT_REDPURPLE
-
PALE_RED
-
PALE_YELLOWRED
-
PALE_YELLOW
-
PALE_GREENYELLOW
-
PALE_GREEN
-
PALE_BLUEGREEN
-
PALE_BLUE
-
PALE_PURPLEBLUE
-
PALE_PURPLE
-
PALE_REDPURPLE
-
VERYPALE_RED
-
VERYPALE_YELLOWRED
-
VERYPALE_YELLOW
-
VERYPALE_GREENYELLOW
-
VERYPALE_GREEN
-
VERYPALE_BLUEGREEN
-
VERYPALE_BLUE
-
VERYPALE_PURPLEBLUE
-
VERYPALE_PURPLE
-
VERYPALE_REDPURPLE
-
LIGHTGRAYISH_RED
-
LIGHTGRAYISH_YELLOWRED
-
LIGHTGRAYISH_YELLOW
-
LIGHTGRAYISH_GREENYELLOW
-
LIGHTGRAYISH_GREEN
-
LIGHTGRAYISH_BLUEGREEN
-
LIGHTGRAYISH_BLUE
-
LIGHTGRAYISH_PURPLEBLUE
-
LIGHTGRAYISH_PURPLE
-
LIGHTGRAYISH_REDPURPLE
-
LIGHT_RED
-
LIGHT_YELLOWRED
-
LIGHT_YELLOW
-
LIGHT_GREENYELLOW
-
LIGHT_GREEN
-
LIGHT_BLUEGREEN
-
LIGHT_BLUE
-
LIGHT_PURPLEBLUE
-
LIGHT_PURPLE
-
LIGHT_REDPURPLE
-
GRAYISH_RED
-
GRAYISH_YELLOWRED
-
GRAYISH_YELLOW
-
GRAYISH_GREENYELLOW
-
GRAYISH_GREEN
-
GRAYISH_BLUEGREEN
-
GRAYISH_BLUE
-
GRAYISH_PURPLEBLUE
-
GRAYISH_PURPLE
-
GRAYISH_REDPURPLE
-
DULL_RED
-
DULL_YELLOWRED
-
DULL_YELLOW
-
DULL_GREENYELLOW
-
DULL_GREEN
-
DULL_BLUEGREEN
-
DULL_BLUE
-
DULL_PURPLEBLUE
-
DULL_PURPLE
-
DULL_REDPURPLE
-
DEEP_RED
-
DEEP_YELLOWRED
-
DEEP_YELLOW
-
DEEP_GREENYELLOW
-
DEEP_GREEN
-
DEEP_BLUEGREEN
-
DEEP_BLUE
-
DEEP_PURPLEBLUE
-
DEEP_PURPLE
-
DEEP_REDPURPLE
-
DARK_RED
-
DARK_YELLOWRED
-
DARK_YELLOW
-
DARK_GREENYELLOW
-
DARK_GREEN
-
DARK_BLUEGREEN
-
DARK_BLUE
-
DARK_PURPLEBLUE
-
DARK_PURPLE
-
DARK_REDPURPLE
-
DARKGRAYISH_RED
-
DARKGRAYISH_YELLOWRED
-
DARKGRAYISH_YELLOW
-
DARKGRAYISH_GREENYELLOW
-
DARKGRAYISH_GREEN
-
DARKGRAYISH_BLUEGREEN
-
DARKGRAYISH_BLUE
-
DARKGRAYISH_PURPLEBLUE
-
DARKGRAYISH_PURPLE
-
DARKGRAYISH_REDPURPLE
-
GRAY1
-
GRAY2
-
GRAY3
-
GRAY4
-
GRAY5
-
GRAY6
-
GRAY7
-
GRAY8
-
LEGACY_PINK
-
LEGACY_ORANGE
-
LEGACY_GREEN
-
NO_FORMATTING
-
-
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
-
color
Gets this name's definedColor
- Returns:
- this
Color
-
format
public long format()Gets this name's defined column format value- Returns:
- this column format
-
toLong
Gets the formatting long of the input color- Parameters:
color
- color- Returns:
- formatting long of the input color
-
toLong
public static long toLong(long color) Gets the formatting long of the input color- Parameters:
color
- color- Returns:
- formatting long of the input color
-
toLong
Gets the formatting long of the input color- Parameters:
color
- color- Returns:
- formatting long of the input color
-
toLong
Gets the formatting long of the input color- Parameters:
color
- color- Returns:
- formatting long of the input color
- Throws:
IllegalArgumentException
- Ifcolor
is invalid
-
background
public static long background(long r, long g, long b) Creates a table format encoding with background color equal to the input RGB and unformatted foreground.- Parameters:
r
- red componentg
- green componentb
- blue component- Returns:
- table format encoding the RGB background color and an unformatted foreground.
-
bg
public static long bg(long r, long g, long b) Convenience method forbackground(long, long, long)
. -
foreground
public static long foreground(long r, long g, long b) Creates a table format encoding with foreground color equal to the input RGB and unformatted background.- Parameters:
r
- red componentg
- green componentb
- blue component- Returns:
- table format encoding the RGB foreground color and an unformatted background.
-
fg
public static long fg(long r, long g, long b) Convenience method forforeground(long, long, long)
. -
backgroundForeground
public static long backgroundForeground(long bgr, long bgg, long bgb, long fgr, long fgg, long fgb) Creates a table format encoding with specified foreground and background colors.- Parameters:
bgr
- red component of the background colorbgg
- green component of the background colorbgb
- blue component of the background colorfgr
- red component of the foreground colorfgg
- green component of the foreground colorfgb
- blue component of the foreground color- Returns:
- table format encoding with specified foreground and background colors
-
bgfg
public static long bgfg(long bgr, long bgg, long bgb, long fgr, long fgg, long fgb) Convenience method forbackgroundForeground(long, long, long, long, long, long)
-
backgroundForegroundAuto
public static long backgroundForegroundAuto(long bgr, long bgg, long bgb) Creates a table format encoding with specified background color and automatically chosen contrasting foreground color.- Parameters:
bgr
- red component of the background colorbgg
- green component of the background colorbgb
- blue component of the background color- Returns:
- table format encoding with background color and auto-generated foreground color
-
bgfga
public static long bgfga(long bgr, long bgg, long bgb) Convenience method forbackgroundForegroundAuto(long, long, long)
-
heatmap
public static long heatmap(double value, double min, double max, long bg1, long bg2) Creates a table format encoding for the heat map atvalue
. A contrasting foreground color is automatically chosen.- Parameters:
value
- determines the color used by its location in the heat map's rangemin
- minimum value of the heat map rangemax
- maximum value of the heat map rangebg1
- background color at or below the minimum value of the heat mapbg2
- background color at or above the maximum value of the heat map- Returns:
- table format encoding with background color and auto-generated foreground color determined by a heat map
-
heatmapForeground
public static long heatmapForeground(double value, double min, double max, long fg1, long fg2) Creates a table format encoding with specified foreground color and unformatted background.- Parameters:
value
- determines the color used by its location in the heat map's rangemin
- minimum value of the heat map rangemax
- maximum value of the heat map rangefg1
- foreground color at or below the minimum value of the heat mapfg2
- foreground color at or above the maximum value of the heat map- Returns:
- table format encoding with foreground color determined by a heat map
-
heatmapFg
public static long heatmapFg(double value, double min, double max, long fg1, long fg2) Convenience method forheatmapForeground(double, double, double, long, long)
-
background
public static long background(long color) Creates a table format encoding with specified background color and an unformatted foreground.- Parameters:
color
- color encoding- Returns:
- table format encoding with specified background color and unformatted foreground
-
bg
public static long bg(long color) Convenience method forbackground(long)
-
foreground
public static long foreground(long color) Creates a table format encoding with specified foreground color and unformatted background.- Parameters:
color
- color encoding- Returns:
- table format encoding with specified foreground color and unformatted background
-
fg
public static long fg(long color) Convenience method forforeground(long)
-