読者です 読者をやめる 読者になる 読者になる

SvgColorName

JavaのColorクラスの定数値だとバリエーションが少ないので、W3CCSS(?)の文章を元に色の定義を作ってみた。

import java.awt.Color;

/**
 * http://www.w3.org/TR/css3-color/
 */
public class SvgColorName {
	public final static Color ALICEBLUE = new Color(240, 248, 255);
	public final static Color ANTIQUEWHITE = new Color(250, 235, 215);
	public final static Color AQUA = new Color(0, 255, 255);
	public final static Color AQUAMARINE = new Color(127, 255, 212);
	public final static Color AZURE = new Color(240, 255, 255);
	public final static Color BEIGE = new Color(245, 245, 220);
	public final static Color BISQUE = new Color(255, 228, 196);
	public final static Color BLACK = new Color(0, 0, 0);
	public final static Color BLANCHEDALMOND = new Color(255, 235, 205);
	public final static Color BLUE = new Color(0, 0, 255);
	public final static Color BLUEVIOLET = new Color(138, 43, 226);
	public final static Color BROWN = new Color(165, 42, 42);
	public final static Color BURLYWOOD = new Color(222, 184, 135);
	public final static Color CADETBLUE = new Color(95, 158, 160);
	public final static Color CHARTREUSE = new Color(127, 255, 0);
	public final static Color CHOCOLATE = new Color(210, 105, 30);
	public final static Color CORAL = new Color(255, 127, 80);
	public final static Color CORNFLOWERBLUE = new Color(100, 149, 237);
	public final static Color CORNSILK = new Color(255, 248, 220);
	public final static Color CRIMSON = new Color(220, 20, 60);
	public final static Color CYAN = new Color(0, 255, 255);
	public final static Color DARKBLUE = new Color(0, 0, 139);
	public final static Color DARKCYAN = new Color(0, 139, 139);
	public final static Color DARKGOLDENROD = new Color(184, 134, 11);
	public final static Color DARKGRAY = new Color(169, 169, 169);
	public final static Color DARKGREEN = new Color(0, 100, 0);
	public final static Color DARKGREY = new Color(169, 169, 169);
	public final static Color DARKKHAKI = new Color(189, 183, 107);
	public final static Color DARKMAGENTA = new Color(139, 0, 139);
	public final static Color DARKOLIVEGREEN = new Color(85, 107, 47);
	public final static Color DARKORANGE = new Color(255, 140, 0);
	public final static Color DARKORCHID = new Color(153, 50, 204);
	public final static Color DARKRED = new Color(139, 0, 0);
	public final static Color DARKSALMON = new Color(233, 150, 122);
	public final static Color DARKSEAGREEN = new Color(143, 188, 143);
	public final static Color DARKSLATEBLUE = new Color(72, 61, 139);
	public final static Color DARKSLATEGRAY = new Color(47, 79, 79);
	public final static Color DARKSLATEGREY = new Color(47, 79, 79);
	public final static Color DARKTURQUOISE = new Color(0, 206, 209);
	public final static Color DARKVIOLET = new Color(148, 0, 211);
	public final static Color DEEPPINK = new Color(255, 20, 147);
	public final static Color DEEPSKYBLUE = new Color(0, 191, 255);
	public final static Color DIMGRAY = new Color(105, 105, 105);
	public final static Color DIMGREY = new Color(105, 105, 105);
	public final static Color DODGERBLUE = new Color(30, 144, 255);
	public final static Color FIREBRICK = new Color(178, 34, 34);
	public final static Color FLORALWHITE = new Color(255, 250, 240);
	public final static Color FORESTGREEN = new Color(34, 139, 34);
	public final static Color FUCHSIA = new Color(255, 0, 255);
	public final static Color GAINSBORO = new Color(220, 220, 220);
	public final static Color GHOSTWHITE = new Color(248, 248, 255);
	public final static Color GOLD = new Color(255, 215, 0);
	public final static Color GOLDENROD = new Color(218, 165, 32);
	public final static Color GRAY = new Color(128, 128, 128);
	public final static Color GREEN = new Color(0, 128, 0);
	public final static Color GREENYELLOW = new Color(173, 255, 47);
	public final static Color GREY = new Color(128, 128, 128);
	public final static Color HONEYDEW = new Color(240, 255, 240);
	public final static Color HOTPINK = new Color(255, 105, 180);
	public final static Color INDIANRED = new Color(205, 92, 92);
	public final static Color INDIGO = new Color(75, 0, 130);
	public final static Color IVORY = new Color(255, 255, 240);
	public final static Color KHAKI = new Color(240, 230, 140);
	public final static Color LAVENDER = new Color(230, 230, 250);
	public final static Color LAVENDERBLUSH = new Color(255, 240, 245);
	public final static Color LAWNGREEN = new Color(124, 252, 0);
	public final static Color LEMONCHIFFON = new Color(255, 250, 205);
	public final static Color LIGHTBLUE = new Color(173, 216, 230);
	public final static Color LIGHTCORAL = new Color(240, 128, 128);
	public final static Color LIGHTCYAN = new Color(224, 255, 255);
	public final static Color LIGHTGOLDENRODYELLOW = new Color(250, 250, 210);
	public final static Color LIGHTGRAY = new Color(211, 211, 211);
	public final static Color LIGHTGREEN = new Color(144, 238, 144);
	public final static Color LIGHTGREY = new Color(211, 211, 211);
	public final static Color LIGHTPINK = new Color(255, 182, 193);
	public final static Color LIGHTSALMON = new Color(255, 160, 122);
	public final static Color LIGHTSEAGREEN = new Color(32, 178, 170);
	public final static Color LIGHTSKYBLUE = new Color(135, 206, 250);
	public final static Color LIGHTSLATEGRAY = new Color(119, 136, 153);
	public final static Color LIGHTSLATEGREY = new Color(119, 136, 153);
	public final static Color LIGHTSTEELBLUE = new Color(176, 196, 222);
	public final static Color LIGHTYELLOW = new Color(255, 255, 224);
	public final static Color LIME = new Color(0, 255, 0);
	public final static Color LIMEGREEN = new Color(50, 205, 50);
	public final static Color LINEN = new Color(250, 240, 230);
	public final static Color MAGENTA = new Color(255, 0, 255);
	public final static Color MAROON = new Color(128, 0, 0);
	public final static Color MEDIUMAQUAMARINE = new Color(102, 205, 170);
	public final static Color MEDIUMBLUE = new Color(0, 0, 205);
	public final static Color MEDIUMORCHID = new Color(186, 85, 211);
	public final static Color MEDIUMPURPLE = new Color(147, 112, 219);
	public final static Color MEDIUMSEAGREEN = new Color(60, 179, 113);
	public final static Color MEDIUMSLATEBLUE = new Color(123, 104, 238);
	public final static Color MEDIUMSPRINGGREEN = new Color(0, 250, 154);
	public final static Color MEDIUMTURQUOISE = new Color(72, 209, 204);
	public final static Color MEDIUMVIOLETRED = new Color(199, 21, 133);
	public final static Color MIDNIGHTBLUE = new Color(25, 25, 112);
	public final static Color MINTCREAM = new Color(245, 255, 250);
	public final static Color MISTYROSE = new Color(255, 228, 225);
	public final static Color MOCCASIN = new Color(255, 228, 181);
	public final static Color NAVAJOWHITE = new Color(255, 222, 173);
	public final static Color NAVY = new Color(0, 0, 128);
	public final static Color OLDLACE = new Color(253, 245, 230);
	public final static Color OLIVE = new Color(128, 128, 0);
	public final static Color OLIVEDRAB = new Color(107, 142, 35);
	public final static Color ORANGE = new Color(255, 165, 0);
	public final static Color ORANGERED = new Color(255, 69, 0);
	public final static Color ORCHID = new Color(218, 112, 214);
	public final static Color PALEGOLDENROD = new Color(238, 232, 170);
	public final static Color PALEGREEN = new Color(152, 251, 152);
	public final static Color PALETURQUOISE = new Color(175, 238, 238);
	public final static Color PALEVIOLETRED = new Color(219, 112, 147);
	public final static Color PAPAYAWHIP = new Color(255, 239, 213);
	public final static Color PEACHPUFF = new Color(255, 218, 185);
	public final static Color PERU = new Color(205, 133, 63);
	public final static Color PINK = new Color(255, 192, 203);
	public final static Color PLUM = new Color(221, 160, 221);
	public final static Color POWDERBLUE = new Color(176, 224, 230);
	public final static Color PURPLE = new Color(128, 0, 128);
	public final static Color RED = new Color(255, 0, 0);
	public final static Color ROSYBROWN = new Color(188, 143, 143);
	public final static Color ROYALBLUE = new Color(65, 105, 225);
	public final static Color SADDLEBROWN = new Color(139, 69, 19);
	public final static Color SALMON = new Color(250, 128, 114);
	public final static Color SANDYBROWN = new Color(244, 164, 96);
	public final static Color SEAGREEN = new Color(46, 139, 87);
	public final static Color SEASHELL = new Color(255, 245, 238);
	public final static Color SIENNA = new Color(160, 82, 45);
	public final static Color SILVER = new Color(192, 192, 192);
	public final static Color SKYBLUE = new Color(135, 206, 235);
	public final static Color SLATEBLUE = new Color(106, 90, 205);
	public final static Color SLATEGRAY = new Color(112, 128, 144);
	public final static Color SLATEGREY = new Color(112, 128, 144);
	public final static Color SNOW = new Color(255, 250, 250);
	public final static Color SPRINGGREEN = new Color(0, 255, 127);
	public final static Color STEELBLUE = new Color(70, 130, 180);
	public final static Color TAN = new Color(210, 180, 140);
	public final static Color TEAL = new Color(0, 128, 128);
	public final static Color THISTLE = new Color(216, 191, 216);
	public final static Color TOMATO = new Color(255, 99, 71);
	public final static Color TURQUOISE = new Color(64, 224, 208);
	public final static Color VIOLET = new Color(238, 130, 238);
	public final static Color WHEAT = new Color(245, 222, 179);
	public final static Color WHITE = new Color(255, 255, 255);
	public final static Color WHITESMOKE = new Color(245, 245, 245);
	public final static Color YELLOW = new Color(255, 255, 0);
	public final static Color YELLOWGREEN = new Color(154, 205, 50);
}