- java.lang.Object
-
- org.arakhne.afc.vmutil.ColorNames
-
public final class ColorNames extends Object
Utilities for retrieving color values from a color name.The supported color names are listing is the table below. The given colors are defined within the JavaFX CSS Color Standard.
Supported colors Color Name RGB Color R, G, B, A Components Example aliceblue F0F8FF rgba(240, 248, 255, 255) antiquewhite FAEBD7 rgba(250, 235, 215, 255) aqua 00FFFF rgba(0, 255, 255, 255) aquamarine 7FFFD4 rgba(127, 255, 212, 255) azure F0FFFF rgba(240, 255, 255, 255) beige F5F5DC rgba(245, 245, 220, 255) bisque FFE4C4 rgba(255, 228, 196, 255) black 000000 rgba(0, 0, 0, 255) blancheddalmond FFEBCD rgba(255, 235, 205, 255) blue 0000FF rgba(0, 0, 255, 255) blueviolet 8A2BE2 rgba(138, 43, 226, 255) brown A52A2A rgba(165, 42, 42, 255) burlywood DEB887 rgba(222, 184, 135, 255) cadetblue 5F9EA0 rgba(95, 158, 160, 255) chartreuse 7FFF00 rgba(127, 255, 0, 255) chocolate D2691E rgba(210, 105, 30, 255) coral FF7F50 rgba(255, 127, 80, 255) cornflowerblue 6495ED rgba(100, 149, 237, 255) cornsilk FFF8DC rgba(255, 248, 220, 255) crimson DC143C rgba(220, 20, 60, 255) cyan 00FFFF rgba(0, 255, 255, 255) darkblue 00008B rgba(0, 0, 139, 255) darkcyan 008B8B rgba(0, 139, 139, 255) darkgoldenrod B8860B rgba(184, 134, 11, 255) darkgray A9A9A9 rgba(169, 169, 169, 255) darkgreen 006400 rgba(0, 100, 0, 255) darkgrey A9A9A9 rgba(169, 169, 169, 255) darkkhaki BDB76B rgba(189, 183, 107, 255) darkmagenta 8B008B rgba(139, 0, 139, 255) darkolivegreen 556B2F rgba(85, 107, 47, 255) darkorange FF8C00 rgba(255, 140, 0, 255) darkorchid 9932CC rgba(153, 50, 204, 255) darkred 8B0000 rgba(139, 0, 0, 255) darksalmon E9967A rgba(233, 150, 122, 255) darkseagreen 8FBC8F rgba(143, 188, 143, 255) darkskyblue 00BFFF rgba(0, 191, 255, 255) darkslateblue 483D8B rgba(72, 61, 139, 255) darkslategray 2F4F4F rgba(47, 79, 79, 255) darkslategrey 2F4F4F rgba(47, 79, 79, 255) darkturquoise 00CED1 rgba(0, 206, 209, 255) darkviolet 9400D3 rgba(148, 0, 211, 255) deeppink FF1493 rgba(255, 20, 147, 255) dimgray 696969 rgba(105, 105, 105, 255) dimgrey 696969 rgba(105, 105, 105, 255) dodgerblue 1E90FF rgba(30, 144, 255, 255) firebrick B22222 rgba(178, 34, 34, 255) floralwhite FFFAF0 rgba(255, 250, 240, 255) forestgreen 228B22 rgba(34, 139, 34, 255) fuchsia FF00FF rgba(255, 0, 255, 255) gainsboro DCDCDC rgba(220, 220, 220, 255) ghostwhite F8F8FF rgba(248, 248, 255, 255) gold FFD700 rgba(255, 215, 0, 255) goldenrod DAA520 rgba(218, 165, 32, 255) gray 808080 rgba(128, 128, 128, 255) green 007D00 rgba(0, 125, 0, 255) greenyellow ADFF2F rgba(173, 255, 47, 255) grey 808080 rgba(128, 128, 128, 255) honeydew F0FFF0 rgba(240, 255, 240, 255) hotpink FF69B4 rgba(255, 105, 180, 255) indianred CD5C5C rgba(205, 92, 92, 255) indigo 4B0082 rgba(75, 0, 130, 255) ivory FFFFF0 rgba(255, 255, 240, 255) khaki F0E68C rgba(240, 230, 140, 255) lavender E6E6FA rgba(230, 230, 250, 255) lavenderblush FFF0F5 rgba(255, 240, 245, 255) lawngreen 7CFC00 rgba(124, 252, 0, 255) lemonchiffon FFFACD rgba(255, 250, 205, 255) lightblue ADD8E6 rgba(173, 216, 230, 255) lightcoral F08080 rgba(240, 128, 128, 255) lightcyan E0FFFF rgba(224, 255, 255, 255) lightgoldenrodyyellow FAFAD2 rgba(250, 250, 210, 255) lightgray D3D3D3 rgba(211, 211, 211, 255) lightgreen 90EE90 rgba(144, 238, 144, 255) lightgrey D3D3D3 rgba(211, 211, 211, 255) lightpink FFB6C1 rgba(255, 182, 193, 255) lightsalmon FFA07A rgba(255, 160, 122, 255) lightseagreen 20B2AA rgba(32, 178, 170, 255) lightskyblue 87CEFA rgba(135, 206, 250, 255) lightslategray 778899 rgba(119, 136, 153, 255) lightslategrey 778899 rgba(119, 136, 153, 255) lightsteelblue B0C4DE rgba(176, 196, 222, 255) lightyellow FFFFE0 rgba(255, 255, 224, 255) lime 00FF00 rgba(0, 255, 0, 255) limegreen 32CD32 rgba(50, 205, 50, 255) linen FAF0E6 rgba(250, 240, 230, 255) magenta FF00FF rgba(255, 0, 255, 255) maroon 800000 rgba(128, 0, 0, 255) mediumaquamarine 66CDAA rgba(102, 205, 170, 255) mediumblue 0000CD rgba(0, 0, 205, 255) mediumorchid BA55D3 rgba(186, 85, 211, 255) mediumpurple 9370DB rgba(147, 112, 219, 255) mediumseagreen 3CB371 rgba(60, 179, 113, 255) mediumslateblue 7B68EE rgba(123, 104, 238, 255) mediumspringgreen 00FA9A rgba(0, 250, 154, 255) mediumturquoise 30D1CC rgba(48, 209, 204, 255) mediumvioletred C71585 rgba(199, 21, 133, 255) midnightblue 191970 rgba(25, 25, 112, 255) mintcream F5FFFA rgba(245, 255, 250, 255) mistyrose FFE4E1 rgba(255, 228, 225, 255) moccasin FFE4B5 rgba(255, 228, 181, 255) navajowhite FFDEAD rgba(255, 222, 173, 255) navy 000080 rgba(0, 0, 128, 255) oldlace FDF5E6 rgba(253, 245, 230, 255) olive 808000 rgba(128, 128, 0, 255) olivedrab 6B8E23 rgba(107, 142, 35, 255) orange FFA500 rgba(255, 165, 0, 255) orangered FF4500 rgba(255, 69, 0, 255) orchid DA70D6 rgba(218, 112, 214, 255) palegoldenrod EEE8AA rgba(238, 232, 170, 255) palegreen 98FB98 rgba(152, 251, 152, 255) paleturquoise AFEEEE rgba(175, 238, 238, 255) palevioletred DB7093 rgba(219, 112, 147, 255) papayawhip FFEFD5 rgba(255, 239, 213, 255) peachpuff FFDAB9 rgba(255, 218, 185, 255) peru CD853F rgba(205, 133, 63, 255) pink FFC0CB rgba(255, 192, 203, 255) plum DDA0DD rgba(221, 160, 221, 255) powderblue B0E0E6 rgba(176, 224, 230, 255) purple 800080 rgba(128, 0, 128, 255) red FF0000 rgba(255, 0, 0, 255) rosybrown BC8F8F rgba(188, 143, 143, 255) royalblue 4169E1 rgba(65, 105, 225, 255) saddlebrown 8B4513 rgba(139, 69, 19, 255) salmon FA8072 rgba(250, 128, 114, 255) sandybrown F4A460 rgba(244, 164, 96, 255) seagreen 2E8B57 rgba(46, 139, 87, 255) seashell FFF5EE rgba(255, 245, 238, 255) sienna A0522D rgba(160, 82, 45, 255) silver C0C0C0 rgba(192, 192, 192, 255) skyblue 87CEEB rgba(135, 206, 235, 255) slateblue 6A5AFA rgba(106, 90, 250, 255) slategray 708090 rgba(112, 128, 144, 255) slategrey 708090 rgba(112, 128, 144, 255) snow FFFAFA rgba(255, 250, 250, 255) springgreen 00FF7F rgba(0, 255, 127, 255) steelblue 4682B4 rgba(70, 130, 180, 255) tan D2B48C rgba(210, 180, 140, 255) teal 008080 rgba(0, 128, 128, 255) thistle D8BFD8 rgba(216, 191, 216, 255) tomato FF6347 rgba(255, 99, 71, 255) transparent 000000 rgba(0, 0, 0, 255) turquoise 40E0D0 rgba(64, 224, 208, 255) violet EE82EE rgba(238, 130, 238, 255) wheat F5DEB3 rgba(245, 222, 179, 255) white FFFFFF rgba(255, 255, 255, 255) whitesmoke F5F5F5 rgba(245, 245, 245, 255) yellow FFFF00 rgba(255, 255, 0, 255) yellowgreen 9ACD32 rgba(154, 205, 50, 255) - Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:35
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- vmutils
-
-
Field Summary
Fields Modifier and Type Field Description static String
BLACK
The name of the black color within in W3C Color Standard.static String
BLUE
The name of the blue color within in W3C Color Standard.static String
CYAN
The name of the cyan color within in W3C Color Standard.static String
DARK_GRAY
The name of the dark gray color within in W3C Color Standard.static String
GRAY
The name of the gray color within in W3C Color Standard.static String
GREEN
The name of the green color within in W3C Color Standard.static String
LIGHT_GRAY
The name of the light gray color within in W3C Color Standard.static String
MAGENTA
The name of the magenta color within in W3C Color Standard.static String
ORANGE
The name of the orange color within in W3C Color Standard.static String
PINK
The name of the pink color within in W3C Color Standard.static String
RED
The name of the red color within in W3C Color Standard.static String
TRANSPARENT
The name of the transparent color components.static String
WHITE
The name of the white color within in W3C Color Standard.static String
YELLOW
The name of the yellow color within in W3C Color Standard.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,Integer>
getColorDefinitions()
Replies the definitions of the known colors.static Integer
getColorFromName(String colorName)
Replies the color value for the given color name.static int
getColorFromName(String colorName, int defaultValue)
Replies the color value for the given color name.static String
getColorNameFromValue(int colorValue)
Replies the color name for the given color value.static Set<String>
getColorNames()
Replies the names of the known colors.
-
-
-
Field Detail
-
TRANSPARENT
public static final String TRANSPARENT
The name of the transparent color components.- See Also:
- Constant Field Values
-
WHITE
public static final String WHITE
The name of the white color within in W3C Color Standard.- See Also:
- Constant Field Values
-
LIGHT_GRAY
public static final String LIGHT_GRAY
The name of the light gray color within in W3C Color Standard.- See Also:
- Constant Field Values
-
GRAY
public static final String GRAY
The name of the gray color within in W3C Color Standard.- See Also:
- Constant Field Values
-
DARK_GRAY
public static final String DARK_GRAY
The name of the dark gray color within in W3C Color Standard.- See Also:
- Constant Field Values
-
BLACK
public static final String BLACK
The name of the black color within in W3C Color Standard.- See Also:
- Constant Field Values
-
RED
public static final String RED
The name of the red color within in W3C Color Standard.- See Also:
- Constant Field Values
-
PINK
public static final String PINK
The name of the pink color within in W3C Color Standard.- See Also:
- Constant Field Values
-
ORANGE
public static final String ORANGE
The name of the orange color within in W3C Color Standard.- See Also:
- Constant Field Values
-
YELLOW
public static final String YELLOW
The name of the yellow color within in W3C Color Standard.- See Also:
- Constant Field Values
-
GREEN
public static final String GREEN
The name of the green color within in W3C Color Standard.- See Also:
- Constant Field Values
-
MAGENTA
public static final String MAGENTA
The name of the magenta color within in W3C Color Standard.- See Also:
- Constant Field Values
-
CYAN
public static final String CYAN
The name of the cyan color within in W3C Color Standard.- See Also:
- Constant Field Values
-
BLUE
public static final String BLUE
The name of the blue color within in W3C Color Standard.- See Also:
- Constant Field Values
-
-
Method Detail
-
getColorNames
@Pure public static Set<String> getColorNames()
Replies the names of the known colors.- Returns:
- the names of the colors.
-
getColorDefinitions
@Pure public static Map<String,Integer> getColorDefinitions()
Replies the definitions of the known colors.- Returns:
- the definitions of the colors.
-
getColorFromName
@Pure public static int getColorFromName(String colorName, int defaultValue)
Replies the color value for the given color name.See the documentation of the
ColorNames()
type for obtaining a list of the colors.- Parameters:
colorName
- the color name.defaultValue
- if the given name does not corresponds to a known color, this value is replied.- Returns:
- the color value.
-
getColorFromName
@Pure public static Integer getColorFromName(String colorName)
Replies the color value for the given color name.See the documentation of the
ColorNames()
type for obtaining a list of the colors.- Parameters:
colorName
- the color name.- Returns:
- the color value, or
null
if the name does not correspond to an known color.
-
getColorNameFromValue
@Pure public static String getColorNameFromValue(int colorValue)
Replies the color name for the given color value.See the documentation of the
ColorNames()
type for obtaining a list of the colors.- Parameters:
colorValue
- the color value.- Returns:
- the color name, or
null
if the value does not correspond to an known color.
-
-