001 /*
002 * Copyright 2008-2014 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package griffon.pivot.support;
017
018 import java.awt.Color;
019
020 /**
021 * Defines all Java, CSS and HTML colors.
022 *
023 * @author Andres Almiray
024 * @since 2.0.0
025 */
026 public enum Colors {
027 BLACK(Color.BLACK),
028 BLUE(Color.BLUE),
029 CYAN(Color.CYAN),
030 DARK_GRAY(Color.DARK_GRAY),
031 GRAY(Color.GRAY),
032 GREEN(Color.GREEN),
033 LIGHT_GRAY(Color.LIGHT_GRAY),
034 MAGENTA(Color.MAGENTA),
035 ORANGE(Color.ORANGE),
036 PINK(Color.PINK),
037 RED(Color.RED),
038 WHITE(Color.WHITE),
039 YELLOW(Color.YELLOW),
040 // css colors
041 FUCHSIA(new Color(255, 0, 255)),
042 SILVER(new Color(192, 192, 192)),
043 OLIVE(new Color(50, 50, 0)),
044 PURPLE(new Color(50, 0, 50)),
045 MAROON(new Color(50, 0, 0)),
046 AQUA(new Color(0, 255, 255)),
047 LIME(new Color(0, 255, 0)),
048 TEAL(new Color(0, 50, 50)),
049 NAVY(new Color(0, 0, 50)),
050 // html colors
051 ALICE_BLUE(new Color(240, 248, 255)),
052 ANTIQUE_WHITE(new Color(250, 235, 215)),
053 AQUAMARINE(new Color(127, 255, 212)),
054 AZURE(new Color(240, 255, 255)),
055 BAKERS_CHOCOLATE(new Color(92, 51, 23)),
056 BEIGE(new Color(245, 245, 220)),
057 BISQUE(new Color(255, 228, 196)),
058 BLANCHED_ALMOND(new Color(255, 235, 205)),
059 BLUE_VIOLET(new Color(138, 43, 226)),
060 BRASS(new Color(181, 166, 66)),
061 BRIGHT_GOLD(new Color(217, 217, 25)),
062 BRONZE(new Color(140, 120, 83)),
063 BROWN(new Color(165, 42, 42)),
064 BURLY_WOOD(new Color(222, 184, 135)),
065 CADET_BLUE(new Color(95, 158, 160)),
066 CHARTREUSE(new Color(127, 255, 0)),
067 CHOCOLATE(new Color(210, 105, 30)),
068 COOL_COPPER(new Color(217, 135, 25)),
069 COPPER(new Color(184, 115, 51)),
070 CORAL(new Color(255, 127, 80)),
071 CORNFLOWER_BLUE(new Color(100, 149, 237)),
072 CORNSILK(new Color(255, 248, 220)),
073 CRIMSON(new Color(220, 20, 60)),
074 DARK_BLUE(new Color(0, 0, 139)),
075 DARK_BROWN(new Color(92, 64, 51)),
076 DARK_CYAN(new Color(0, 139, 139)),
077 DARK_GOLDEN_ROD(new Color(184, 134, 11)),
078 DARK_GREEN(new Color(0, 100, 0)),
079 DARK_GREEN_COPPER(new Color(74, 118, 110)),
080 DARK_KHAKI(new Color(189, 183, 107)),
081 DARK_MAGENTA(new Color(139, 0, 139)),
082 DARK_OLIVE_GREEN(new Color(85, 107, 47)),
083 DARK_ORANGE(new Color(255, 140, 0)),
084 DARK_ORCHID(new Color(153, 50, 204)),
085 DARK_PURPLE(new Color(135, 31, 120)),
086 DARK_RED(new Color(139, 0, 0)),
087 DARK_SALMON(new Color(233, 150, 122)),
088 DARK_SEA_GREEN(new Color(143, 188, 143)),
089 DARK_SLATE_BLUE(new Color(72, 61, 139)),
090 DARK_SLATE_GRAY(new Color(47, 79, 79)),
091 DARK_TAN(new Color(151, 105, 79)),
092 DARK_TURQUOISE(new Color(0, 206, 209)),
093 DARK_VIOLET(new Color(148, 0, 211)),
094 DARK_WOOD(new Color(133, 94, 66)),
095 DEEP_PINK(new Color(255, 20, 147)),
096 DEEP_SKY_BLUE(new Color(0, 191, 255)),
097 DIM_GRAY(new Color(105, 105, 105)),
098 DODGER_BLUE(new Color(30, 144, 255)),
099 DUSTY_ROSE(new Color(133, 99, 99)),
100 FADED_BROWN(new Color(245, 204, 176)),
101 FELDSPAR(new Color(209, 146, 117)),
102 FIRE_BRICK(new Color(178, 34, 34)),
103 FLORAL_WHITE(new Color(255, 250, 240)),
104 FOREST_GREEN(new Color(34, 139, 34)),
105 GAINSBORO(new Color(220, 220, 220)),
106 GHOST_WHITE(new Color(248, 248, 255)),
107 GOLD(new Color(255, 215, 0)),
108 GOLDEN_ROD(new Color(218, 165, 32)),
109 GREEN_COPPER(new Color(82, 127, 118)),
110 GREEN_YELLOW(new Color(173, 255, 47)),
111 HONEY_DEW(new Color(240, 255, 240)),
112 HOT_PINK(new Color(255, 105, 180)),
113 HUNTER_GREEN(new Color(33, 94, 33)),
114 INDIAN_RED(new Color(205, 92, 92)),
115 INDIGO(new Color(75, 0, 130)),
116 IVORY(new Color(255, 255, 240)),
117 KHAKI(new Color(240, 230, 140)),
118 LAVENDER(new Color(230, 230, 250)),
119 LAVENDER_BLUSH(new Color(255, 240, 245)),
120 LAWN_GREEN(new Color(124, 252, 0)),
121 LEMON_CHIFFON(new Color(255, 250, 205)),
122 LIGHT_BLUE(new Color(173, 216, 230)),
123 LIGHT_CORAL(new Color(240, 128, 128)),
124 LIGHT_CYAN(new Color(224, 255, 255)),
125 LIGHT_GOLDEN_ROD_YELLOW(new Color(250, 250, 210)),
126 LIGHT_GREEN(new Color(144, 238, 144)),
127 LIGHT_PINK(new Color(255, 182, 193)),
128 LIGHT_SALMON(new Color(255, 160, 122)),
129 LIGHT_SEA_GREEN(new Color(32, 178, 170)),
130 LIGHT_SKY_BLUE(new Color(135, 206, 250)),
131 LIGHT_SLATE_BLUE(new Color(132, 112, 255)),
132 LIGHT_SLATE_GRAY(new Color(119, 136, 153)),
133 LIGHT_STEEL_BLUE(new Color(176, 196, 222)),
134 LIGHT_WOOD(new Color(233, 194, 166)),
135 LIGHT_YELLOW(new Color(255, 255, 224)),
136 LIME_GREEN(new Color(50, 205, 50)),
137 LINEN(new Color(250, 240, 230)),
138 MANDARIN_ORANGE(new Color(228, 120, 51)),
139 MEDIUM_AQUA_MARINE(new Color(102, 205, 170)),
140 MEDIUM_BLUE(new Color(0, 0, 205)),
141 MEDIUM_GOLDEN_ROD(new Color(234, 234, 174)),
142 MEDIUM_ORCHID(new Color(186, 85, 211)),
143 MEDIUM_PURPLE(new Color(147, 112, 216)),
144 MEDIUM_SEA_GREEN(new Color(60, 179, 113)),
145 MEDIUM_SLATE_BLUE(new Color(123, 104, 238)),
146 MEDIUM_SPRING_GREEN(new Color(0, 250, 154)),
147 MEDIUM_TURQUOISE(new Color(72, 209, 204)),
148 MEDIUM_VIOLET_RED(new Color(199, 21, 133)),
149 MEDIUM_WOOD(new Color(166, 128, 100)),
150 MIDNIGHT_BLUE(new Color(25, 25, 112)),
151 MINT_CREAM(new Color(245, 255, 250)),
152 MISTY_ROSE(new Color(255, 228, 225)),
153 MOCCASIN(new Color(255, 228, 181)),
154 NAVAJO_WHITE(new Color(255, 222, 173)),
155 NAVY_BLUE(new Color(35, 35, 142)),
156 NEON_BLUE(new Color(77, 77, 255)),
157 NEON_PINK(new Color(255, 110, 199)),
158 NEW_MIDNIGHT_BLUE(new Color(0, 0, 156)),
159 NEW_TAN(new Color(235, 199, 158)),
160 OLD_GOLD(new Color(207, 181, 59)),
161 OLD_LACE(new Color(253, 245, 230)),
162 OLIVE_DRAB(new Color(107, 142, 35)),
163 ORANGE_RED(new Color(255, 69, 0)),
164 ORCHID(new Color(218, 112, 214)),
165 PALE_GOLDEN_ROD(new Color(238, 232, 170)),
166 PALE_GREEN(new Color(152, 251, 152)),
167 PALE_TURQUOISE(new Color(175, 238, 238)),
168 PALE_VIOLET_RED(new Color(216, 112, 147)),
169 PAPAYA_WHIP(new Color(255, 239, 213)),
170 PEACH_PUFF(new Color(255, 218, 185)),
171 PERU(new Color(205, 133, 63)),
172 PLUM(new Color(221, 160, 221)),
173 POWDER_BLUE(new Color(176, 224, 230)),
174 QUARTZ(new Color(217, 217, 243)),
175 RICH_BLUE(new Color(89, 89, 171)),
176 ROSY_BROWN(new Color(188, 143, 143)),
177 ROYAL_BLUE(new Color(65, 105, 225)),
178 SADDLE_BROWN(new Color(139, 69, 19)),
179 SALMON(new Color(250, 128, 114)),
180 SANDY_BROWN(new Color(244, 164, 96)),
181 SCARLET(new Color(140, 23, 23)),
182 SEA_GREEN(new Color(46, 139, 87)),
183 SEA_SHELL(new Color(255, 245, 238)),
184 SEMI_SWEET_CHOCOLATE(new Color(107, 66, 38)),
185 SIENNA(new Color(160, 82, 45)),
186 SKY_BLUE(new Color(135, 206, 235)),
187 SLATE_BLUE(new Color(106, 90, 205)),
188 SLATE_GRAY(new Color(112, 128, 144)),
189 SNOW(new Color(255, 250, 250)),
190 SPICY_PINK(new Color(255, 28, 174)),
191 SPRING_GREEN(new Color(0, 255, 127)),
192 STEEL_BLUE(new Color(70, 130, 180)),
193 SUMMER_SKY(new Color(56, 176, 222)),
194 TAN(new Color(210, 180, 140)),
195 THISTLE(new Color(216, 191, 216)),
196 TOMATO(new Color(255, 99, 71)),
197 TURQUOISE(new Color(64, 224, 208)),
198 VERY_LIGHT_GREY(new Color(205, 205, 205)),
199 VIOLET(new Color(238, 130, 238)),
200 VIOLET_RED(new Color(208, 32, 144)),
201 WHEAT(new Color(245, 222, 179)),
202 WHITE_SMOKE(new Color(245, 245, 245)),
203 YELLOW_GREEN(new Color(154, 205, 50));
204
205 private final Color color;
206
207 Colors(Color color) {
208 this.color = color;
209 }
210
211 public Color getColor() {
212 return color;
213 }
214 }
|