1 /*
   2  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.java.swing.plaf.gtk;
  27 
  28 import java.awt.Color;
  29 import java.util.Arrays;
  30 import javax.swing.plaf.ColorUIResource;
  31 
  32 /**
  33  * @author  Shannon Hickey
  34  */
  35 class XColors {
  36 
  37     private static class XColor implements Comparable<XColor> {
  38         String name;
  39 
  40         int red;
  41         int green;
  42         int blue;
  43 
  44         XColor(String name, int red, int green, int blue) {
  45             this.name = name;
  46             this.red = red;
  47             this.green = green;
  48             this.blue = blue;
  49         }
  50 
  51         Color toColor() {
  52             return new ColorUIResource(red, green, blue);
  53         }
  54 
  55         public int compareTo(XColor o) {
  56             return name.compareTo(o.name);
  57         }
  58     }
  59 
  60     private static XColor key = new XColor("", -1, -1, -1);
  61 
  62     static Color lookupColor(String name) {
  63         key.name = name.toLowerCase();
  64 
  65         int pos = Arrays.binarySearch(colors, key);
  66 
  67         if (pos < 0) {
  68             return null;
  69         }
  70 
  71         return colors[pos].toColor();
  72     }
  73 
  74     private static final XColor[] colors = {
  75         new XColor("alice blue", 240, 248, 255),
  76         new XColor("aliceblue", 240, 248, 255),
  77         new XColor("antique white", 250, 235, 215),
  78         new XColor("antiquewhite", 250, 235, 215),
  79         new XColor("antiquewhite1", 255, 239, 219),
  80         new XColor("antiquewhite2", 238, 223, 204),
  81         new XColor("antiquewhite3", 205, 192, 176),
  82         new XColor("antiquewhite4", 139, 131, 120),
  83         new XColor("aquamarine", 127, 255, 212),
  84         new XColor("aquamarine1", 127, 255, 212),
  85         new XColor("aquamarine2", 118, 238, 198),
  86         new XColor("aquamarine3", 102, 205, 170),
  87         new XColor("aquamarine4", 69, 139, 116),
  88         new XColor("azure", 240, 255, 255),
  89         new XColor("azure1", 240, 255, 255),
  90         new XColor("azure2", 224, 238, 238),
  91         new XColor("azure3", 193, 205, 205),
  92         new XColor("azure4", 131, 139, 139),
  93         new XColor("beige", 245, 245, 220),
  94         new XColor("bisque", 255, 228, 196),
  95         new XColor("bisque1", 255, 228, 196),
  96         new XColor("bisque2", 238, 213, 183),
  97         new XColor("bisque3", 205, 183, 158),
  98         new XColor("bisque4", 139, 125, 107),
  99         new XColor("black", 0, 0, 0),
 100         new XColor("blanched almond", 255, 235, 205),
 101         new XColor("blanchedalmond", 255, 235, 205),
 102         new XColor("blue", 0, 0, 255),
 103         new XColor("blue violet", 138, 43, 226),
 104         new XColor("blue1", 0, 0, 255),
 105         new XColor("blue2", 0, 0, 238),
 106         new XColor("blue3", 0, 0, 205),
 107         new XColor("blue4", 0, 0, 139),
 108         new XColor("blueviolet", 138, 43, 226),
 109         new XColor("brown", 165, 42, 42),
 110         new XColor("brown1", 255, 64, 64),
 111         new XColor("brown2", 238, 59, 59),
 112         new XColor("brown3", 205, 51, 51),
 113         new XColor("brown4", 139, 35, 35),
 114         new XColor("burlywood", 222, 184, 135),
 115         new XColor("burlywood1", 255, 211, 155),
 116         new XColor("burlywood2", 238, 197, 145),
 117         new XColor("burlywood3", 205, 170, 125),
 118         new XColor("burlywood4", 139, 115, 85),
 119         new XColor("cadet blue", 95, 158, 160),
 120         new XColor("cadetblue", 95, 158, 160),
 121         new XColor("cadetblue1", 152, 245, 255),
 122         new XColor("cadetblue2", 142, 229, 238),
 123         new XColor("cadetblue3", 122, 197, 205),
 124         new XColor("cadetblue4", 83, 134, 139),
 125         new XColor("chartreuse", 127, 255, 0),
 126         new XColor("chartreuse1", 127, 255, 0),
 127         new XColor("chartreuse2", 118, 238, 0),
 128         new XColor("chartreuse3", 102, 205, 0),
 129         new XColor("chartreuse4", 69, 139, 0),
 130         new XColor("chocolate", 210, 105, 30),
 131         new XColor("chocolate1", 255, 127, 36),
 132         new XColor("chocolate2", 238, 118, 33),
 133         new XColor("chocolate3", 205, 102, 29),
 134         new XColor("chocolate4", 139, 69, 19),
 135         new XColor("coral", 255, 127, 80),
 136         new XColor("coral1", 255, 114, 86),
 137         new XColor("coral2", 238, 106, 80),
 138         new XColor("coral3", 205, 91, 69),
 139         new XColor("coral4", 139, 62, 47),
 140         new XColor("cornflower blue", 100, 149, 237),
 141         new XColor("cornflowerblue", 100, 149, 237),
 142         new XColor("cornsilk", 255, 248, 220),
 143         new XColor("cornsilk1", 255, 248, 220),
 144         new XColor("cornsilk2", 238, 232, 205),
 145         new XColor("cornsilk3", 205, 200, 177),
 146         new XColor("cornsilk4", 139, 136, 120),
 147         new XColor("cyan", 0, 255, 255),
 148         new XColor("cyan1", 0, 255, 255),
 149         new XColor("cyan2", 0, 238, 238),
 150         new XColor("cyan3", 0, 205, 205),
 151         new XColor("cyan4", 0, 139, 139),
 152         new XColor("dark blue", 0, 0, 139),
 153         new XColor("dark cyan", 0, 139, 139),
 154         new XColor("dark goldenrod", 184, 134, 11),
 155         new XColor("dark gray", 169, 169, 169),
 156         new XColor("dark green", 0, 100, 0),
 157         new XColor("dark grey", 169, 169, 169),
 158         new XColor("dark khaki", 189, 183, 107),
 159         new XColor("dark magenta", 139, 0, 139),
 160         new XColor("dark olive green", 85, 107, 47),
 161         new XColor("dark orange", 255, 140, 0),
 162         new XColor("dark orchid", 153, 50, 204),
 163         new XColor("dark red", 139, 0, 0),
 164         new XColor("dark salmon", 233, 150, 122),
 165         new XColor("dark sea green", 143, 188, 143),
 166         new XColor("dark slate blue", 72, 61, 139),
 167         new XColor("dark slate gray", 47, 79, 79),
 168         new XColor("dark slate grey", 47, 79, 79),
 169         new XColor("dark turquoise", 0, 206, 209),
 170         new XColor("dark violet", 148, 0, 211),
 171         new XColor("darkblue", 0, 0, 139),
 172         new XColor("darkcyan", 0, 139, 139),
 173         new XColor("darkgoldenrod", 184, 134, 11),
 174         new XColor("darkgoldenrod1", 255, 185, 15),
 175         new XColor("darkgoldenrod2", 238, 173, 14),
 176         new XColor("darkgoldenrod3", 205, 149, 12),
 177         new XColor("darkgoldenrod4", 139, 101, 8),
 178         new XColor("darkgray", 169, 169, 169),
 179         new XColor("darkgreen", 0, 100, 0),
 180         new XColor("darkgrey", 169, 169, 169),
 181         new XColor("darkkhaki", 189, 183, 107),
 182         new XColor("darkmagenta", 139, 0, 139),
 183         new XColor("darkolivegreen", 85, 107, 47),
 184         new XColor("darkolivegreen1", 202, 255, 112),
 185         new XColor("darkolivegreen2", 188, 238, 104),
 186         new XColor("darkolivegreen3", 162, 205, 90),
 187         new XColor("darkolivegreen4", 110, 139, 61),
 188         new XColor("darkorange", 255, 140, 0),
 189         new XColor("darkorange1", 255, 127, 0),
 190         new XColor("darkorange2", 238, 118, 0),
 191         new XColor("darkorange3", 205, 102, 0),
 192         new XColor("darkorange4", 139, 69, 0),
 193         new XColor("darkorchid", 153, 50, 204),
 194         new XColor("darkorchid1", 191, 62, 255),
 195         new XColor("darkorchid2", 178, 58, 238),
 196         new XColor("darkorchid3", 154, 50, 205),
 197         new XColor("darkorchid4", 104, 34, 139),
 198         new XColor("darkred", 139, 0, 0),
 199         new XColor("darksalmon", 233, 150, 122),
 200         new XColor("darkseagreen", 143, 188, 143),
 201         new XColor("darkseagreen1", 193, 255, 193),
 202         new XColor("darkseagreen2", 180, 238, 180),
 203         new XColor("darkseagreen3", 155, 205, 155),
 204         new XColor("darkseagreen4", 105, 139, 105),
 205         new XColor("darkslateblue", 72, 61, 139),
 206         new XColor("darkslategray", 47, 79, 79),
 207         new XColor("darkslategray1", 151, 255, 255),
 208         new XColor("darkslategray2", 141, 238, 238),
 209         new XColor("darkslategray3", 121, 205, 205),
 210         new XColor("darkslategray4", 82, 139, 139),
 211         new XColor("darkslategrey", 47, 79, 79),
 212         new XColor("darkturquoise", 0, 206, 209),
 213         new XColor("darkviolet", 148, 0, 211),
 214         new XColor("deep pink", 255, 20, 147),
 215         new XColor("deep sky blue", 0, 191, 255),
 216         new XColor("deeppink", 255, 20, 147),
 217         new XColor("deeppink1", 255, 20, 147),
 218         new XColor("deeppink2", 238, 18, 137),
 219         new XColor("deeppink3", 205, 16, 118),
 220         new XColor("deeppink4", 139, 10, 80),
 221         new XColor("deepskyblue", 0, 191, 255),
 222         new XColor("deepskyblue1", 0, 191, 255),
 223         new XColor("deepskyblue2", 0, 178, 238),
 224         new XColor("deepskyblue3", 0, 154, 205),
 225         new XColor("deepskyblue4", 0, 104, 139),
 226         new XColor("dim gray", 105, 105, 105),
 227         new XColor("dim grey", 105, 105, 105),
 228         new XColor("dimgray", 105, 105, 105),
 229         new XColor("dimgrey", 105, 105, 105),
 230         new XColor("dodger blue", 30, 144, 255),
 231         new XColor("dodgerblue", 30, 144, 255),
 232         new XColor("dodgerblue1", 30, 144, 255),
 233         new XColor("dodgerblue2", 28, 134, 238),
 234         new XColor("dodgerblue3", 24, 116, 205),
 235         new XColor("dodgerblue4", 16, 78, 139),
 236         new XColor("firebrick", 178, 34, 34),
 237         new XColor("firebrick1", 255, 48, 48),
 238         new XColor("firebrick2", 238, 44, 44),
 239         new XColor("firebrick3", 205, 38, 38),
 240         new XColor("firebrick4", 139, 26, 26),
 241         new XColor("floral white", 255, 250, 240),
 242         new XColor("floralwhite", 255, 250, 240),
 243         new XColor("forest green", 34, 139, 34),
 244         new XColor("forestgreen", 34, 139, 34),
 245         new XColor("gainsboro", 220, 220, 220),
 246         new XColor("ghost white", 248, 248, 255),
 247         new XColor("ghostwhite", 248, 248, 255),
 248         new XColor("gold", 255, 215, 0),
 249         new XColor("gold1", 255, 215, 0),
 250         new XColor("gold2", 238, 201, 0),
 251         new XColor("gold3", 205, 173, 0),
 252         new XColor("gold4", 139, 117, 0),
 253         new XColor("goldenrod", 218, 165, 32),
 254         new XColor("goldenrod1", 255, 193, 37),
 255         new XColor("goldenrod2", 238, 180, 34),
 256         new XColor("goldenrod3", 205, 155, 29),
 257         new XColor("goldenrod4", 139, 105, 20),
 258         new XColor("gray", 190, 190, 190),
 259         new XColor("gray0", 0, 0, 0),
 260         new XColor("gray1", 3, 3, 3),
 261         new XColor("gray10", 26, 26, 26),
 262         new XColor("gray100", 255, 255, 255),
 263         new XColor("gray11", 28, 28, 28),
 264         new XColor("gray12", 31, 31, 31),
 265         new XColor("gray13", 33, 33, 33),
 266         new XColor("gray14", 36, 36, 36),
 267         new XColor("gray15", 38, 38, 38),
 268         new XColor("gray16", 41, 41, 41),
 269         new XColor("gray17", 43, 43, 43),
 270         new XColor("gray18", 46, 46, 46),
 271         new XColor("gray19", 48, 48, 48),
 272         new XColor("gray2", 5, 5, 5),
 273         new XColor("gray20", 51, 51, 51),
 274         new XColor("gray21", 54, 54, 54),
 275         new XColor("gray22", 56, 56, 56),
 276         new XColor("gray23", 59, 59, 59),
 277         new XColor("gray24", 61, 61, 61),
 278         new XColor("gray25", 64, 64, 64),
 279         new XColor("gray26", 66, 66, 66),
 280         new XColor("gray27", 69, 69, 69),
 281         new XColor("gray28", 71, 71, 71),
 282         new XColor("gray29", 74, 74, 74),
 283         new XColor("gray3", 8, 8, 8),
 284         new XColor("gray30", 77, 77, 77),
 285         new XColor("gray31", 79, 79, 79),
 286         new XColor("gray32", 82, 82, 82),
 287         new XColor("gray33", 84, 84, 84),
 288         new XColor("gray34", 87, 87, 87),
 289         new XColor("gray35", 89, 89, 89),
 290         new XColor("gray36", 92, 92, 92),
 291         new XColor("gray37", 94, 94, 94),
 292         new XColor("gray38", 97, 97, 97),
 293         new XColor("gray39", 99, 99, 99),
 294         new XColor("gray4", 10, 10, 10),
 295         new XColor("gray40", 102, 102, 102),
 296         new XColor("gray41", 105, 105, 105),
 297         new XColor("gray42", 107, 107, 107),
 298         new XColor("gray43", 110, 110, 110),
 299         new XColor("gray44", 112, 112, 112),
 300         new XColor("gray45", 115, 115, 115),
 301         new XColor("gray46", 117, 117, 117),
 302         new XColor("gray47", 120, 120, 120),
 303         new XColor("gray48", 122, 122, 122),
 304         new XColor("gray49", 125, 125, 125),
 305         new XColor("gray5", 13, 13, 13),
 306         new XColor("gray50", 127, 127, 127),
 307         new XColor("gray51", 130, 130, 130),
 308         new XColor("gray52", 133, 133, 133),
 309         new XColor("gray53", 135, 135, 135),
 310         new XColor("gray54", 138, 138, 138),
 311         new XColor("gray55", 140, 140, 140),
 312         new XColor("gray56", 143, 143, 143),
 313         new XColor("gray57", 145, 145, 145),
 314         new XColor("gray58", 148, 148, 148),
 315         new XColor("gray59", 150, 150, 150),
 316         new XColor("gray6", 15, 15, 15),
 317         new XColor("gray60", 153, 153, 153),
 318         new XColor("gray61", 156, 156, 156),
 319         new XColor("gray62", 158, 158, 158),
 320         new XColor("gray63", 161, 161, 161),
 321         new XColor("gray64", 163, 163, 163),
 322         new XColor("gray65", 166, 166, 166),
 323         new XColor("gray66", 168, 168, 168),
 324         new XColor("gray67", 171, 171, 171),
 325         new XColor("gray68", 173, 173, 173),
 326         new XColor("gray69", 176, 176, 176),
 327         new XColor("gray7", 18, 18, 18),
 328         new XColor("gray70", 179, 179, 179),
 329         new XColor("gray71", 181, 181, 181),
 330         new XColor("gray72", 184, 184, 184),
 331         new XColor("gray73", 186, 186, 186),
 332         new XColor("gray74", 189, 189, 189),
 333         new XColor("gray75", 191, 191, 191),
 334         new XColor("gray76", 194, 194, 194),
 335         new XColor("gray77", 196, 196, 196),
 336         new XColor("gray78", 199, 199, 199),
 337         new XColor("gray79", 201, 201, 201),
 338         new XColor("gray8", 20, 20, 20),
 339         new XColor("gray80", 204, 204, 204),
 340         new XColor("gray81", 207, 207, 207),
 341         new XColor("gray82", 209, 209, 209),
 342         new XColor("gray83", 212, 212, 212),
 343         new XColor("gray84", 214, 214, 214),
 344         new XColor("gray85", 217, 217, 217),
 345         new XColor("gray86", 219, 219, 219),
 346         new XColor("gray87", 222, 222, 222),
 347         new XColor("gray88", 224, 224, 224),
 348         new XColor("gray89", 227, 227, 227),
 349         new XColor("gray9", 23, 23, 23),
 350         new XColor("gray90", 229, 229, 229),
 351         new XColor("gray91", 232, 232, 232),
 352         new XColor("gray92", 235, 235, 235),
 353         new XColor("gray93", 237, 237, 237),
 354         new XColor("gray94", 240, 240, 240),
 355         new XColor("gray95", 242, 242, 242),
 356         new XColor("gray96", 245, 245, 245),
 357         new XColor("gray97", 247, 247, 247),
 358         new XColor("gray98", 250, 250, 250),
 359         new XColor("gray99", 252, 252, 252),
 360         new XColor("green", 0, 255, 0),
 361         new XColor("green yellow", 173, 255, 47),
 362         new XColor("green1", 0, 255, 0),
 363         new XColor("green2", 0, 238, 0),
 364         new XColor("green3", 0, 205, 0),
 365         new XColor("green4", 0, 139, 0),
 366         new XColor("greenyellow", 173, 255, 47),
 367         new XColor("grey", 190, 190, 190),
 368         new XColor("grey0", 0, 0, 0),
 369         new XColor("grey1", 3, 3, 3),
 370         new XColor("grey10", 26, 26, 26),
 371         new XColor("grey100", 255, 255, 255),
 372         new XColor("grey11", 28, 28, 28),
 373         new XColor("grey12", 31, 31, 31),
 374         new XColor("grey13", 33, 33, 33),
 375         new XColor("grey14", 36, 36, 36),
 376         new XColor("grey15", 38, 38, 38),
 377         new XColor("grey16", 41, 41, 41),
 378         new XColor("grey17", 43, 43, 43),
 379         new XColor("grey18", 46, 46, 46),
 380         new XColor("grey19", 48, 48, 48),
 381         new XColor("grey2", 5, 5, 5),
 382         new XColor("grey20", 51, 51, 51),
 383         new XColor("grey21", 54, 54, 54),
 384         new XColor("grey22", 56, 56, 56),
 385         new XColor("grey23", 59, 59, 59),
 386         new XColor("grey24", 61, 61, 61),
 387         new XColor("grey25", 64, 64, 64),
 388         new XColor("grey26", 66, 66, 66),
 389         new XColor("grey27", 69, 69, 69),
 390         new XColor("grey28", 71, 71, 71),
 391         new XColor("grey29", 74, 74, 74),
 392         new XColor("grey3", 8, 8, 8),
 393         new XColor("grey30", 77, 77, 77),
 394         new XColor("grey31", 79, 79, 79),
 395         new XColor("grey32", 82, 82, 82),
 396         new XColor("grey33", 84, 84, 84),
 397         new XColor("grey34", 87, 87, 87),
 398         new XColor("grey35", 89, 89, 89),
 399         new XColor("grey36", 92, 92, 92),
 400         new XColor("grey37", 94, 94, 94),
 401         new XColor("grey38", 97, 97, 97),
 402         new XColor("grey39", 99, 99, 99),
 403         new XColor("grey4", 10, 10, 10),
 404         new XColor("grey40", 102, 102, 102),
 405         new XColor("grey41", 105, 105, 105),
 406         new XColor("grey42", 107, 107, 107),
 407         new XColor("grey43", 110, 110, 110),
 408         new XColor("grey44", 112, 112, 112),
 409         new XColor("grey45", 115, 115, 115),
 410         new XColor("grey46", 117, 117, 117),
 411         new XColor("grey47", 120, 120, 120),
 412         new XColor("grey48", 122, 122, 122),
 413         new XColor("grey49", 125, 125, 125),
 414         new XColor("grey5", 13, 13, 13),
 415         new XColor("grey50", 127, 127, 127),
 416         new XColor("grey51", 130, 130, 130),
 417         new XColor("grey52", 133, 133, 133),
 418         new XColor("grey53", 135, 135, 135),
 419         new XColor("grey54", 138, 138, 138),
 420         new XColor("grey55", 140, 140, 140),
 421         new XColor("grey56", 143, 143, 143),
 422         new XColor("grey57", 145, 145, 145),
 423         new XColor("grey58", 148, 148, 148),
 424         new XColor("grey59", 150, 150, 150),
 425         new XColor("grey6", 15, 15, 15),
 426         new XColor("grey60", 153, 153, 153),
 427         new XColor("grey61", 156, 156, 156),
 428         new XColor("grey62", 158, 158, 158),
 429         new XColor("grey63", 161, 161, 161),
 430         new XColor("grey64", 163, 163, 163),
 431         new XColor("grey65", 166, 166, 166),
 432         new XColor("grey66", 168, 168, 168),
 433         new XColor("grey67", 171, 171, 171),
 434         new XColor("grey68", 173, 173, 173),
 435         new XColor("grey69", 176, 176, 176),
 436         new XColor("grey7", 18, 18, 18),
 437         new XColor("grey70", 179, 179, 179),
 438         new XColor("grey71", 181, 181, 181),
 439         new XColor("grey72", 184, 184, 184),
 440         new XColor("grey73", 186, 186, 186),
 441         new XColor("grey74", 189, 189, 189),
 442         new XColor("grey75", 191, 191, 191),
 443         new XColor("grey76", 194, 194, 194),
 444         new XColor("grey77", 196, 196, 196),
 445         new XColor("grey78", 199, 199, 199),
 446         new XColor("grey79", 201, 201, 201),
 447         new XColor("grey8", 20, 20, 20),
 448         new XColor("grey80", 204, 204, 204),
 449         new XColor("grey81", 207, 207, 207),
 450         new XColor("grey82", 209, 209, 209),
 451         new XColor("grey83", 212, 212, 212),
 452         new XColor("grey84", 214, 214, 214),
 453         new XColor("grey85", 217, 217, 217),
 454         new XColor("grey86", 219, 219, 219),
 455         new XColor("grey87", 222, 222, 222),
 456         new XColor("grey88", 224, 224, 224),
 457         new XColor("grey89", 227, 227, 227),
 458         new XColor("grey9", 23, 23, 23),
 459         new XColor("grey90", 229, 229, 229),
 460         new XColor("grey91", 232, 232, 232),
 461         new XColor("grey92", 235, 235, 235),
 462         new XColor("grey93", 237, 237, 237),
 463         new XColor("grey94", 240, 240, 240),
 464         new XColor("grey95", 242, 242, 242),
 465         new XColor("grey96", 245, 245, 245),
 466         new XColor("grey97", 247, 247, 247),
 467         new XColor("grey98", 250, 250, 250),
 468         new XColor("grey99", 252, 252, 252),
 469         new XColor("honeydew", 240, 255, 240),
 470         new XColor("honeydew1", 240, 255, 240),
 471         new XColor("honeydew2", 224, 238, 224),
 472         new XColor("honeydew3", 193, 205, 193),
 473         new XColor("honeydew4", 131, 139, 131),
 474         new XColor("hot pink", 255, 105, 180),
 475         new XColor("hotpink", 255, 105, 180),
 476         new XColor("hotpink1", 255, 110, 180),
 477         new XColor("hotpink2", 238, 106, 167),
 478         new XColor("hotpink3", 205, 96, 144),
 479         new XColor("hotpink4", 139, 58, 98),
 480         new XColor("indian red", 205, 92, 92),
 481         new XColor("indianred", 205, 92, 92),
 482         new XColor("indianred1", 255, 106, 106),
 483         new XColor("indianred2", 238, 99, 99),
 484         new XColor("indianred3", 205, 85, 85),
 485         new XColor("indianred4", 139, 58, 58),
 486         new XColor("ivory", 255, 255, 240),
 487         new XColor("ivory1", 255, 255, 240),
 488         new XColor("ivory2", 238, 238, 224),
 489         new XColor("ivory3", 205, 205, 193),
 490         new XColor("ivory4", 139, 139, 131),
 491         new XColor("khaki", 240, 230, 140),
 492         new XColor("khaki1", 255, 246, 143),
 493         new XColor("khaki2", 238, 230, 133),
 494         new XColor("khaki3", 205, 198, 115),
 495         new XColor("khaki4", 139, 134, 78),
 496         new XColor("lavender", 230, 230, 250),
 497         new XColor("lavender blush", 255, 240, 245),
 498         new XColor("lavenderblush", 255, 240, 245),
 499         new XColor("lavenderblush1", 255, 240, 245),
 500         new XColor("lavenderblush2", 238, 224, 229),
 501         new XColor("lavenderblush3", 205, 193, 197),
 502         new XColor("lavenderblush4", 139, 131, 134),
 503         new XColor("lawn green", 124, 252, 0),
 504         new XColor("lawngreen", 124, 252, 0),
 505         new XColor("lemon chiffon", 255, 250, 205),
 506         new XColor("lemonchiffon", 255, 250, 205),
 507         new XColor("lemonchiffon1", 255, 250, 205),
 508         new XColor("lemonchiffon2", 238, 233, 191),
 509         new XColor("lemonchiffon3", 205, 201, 165),
 510         new XColor("lemonchiffon4", 139, 137, 112),
 511         new XColor("light blue", 173, 216, 230),
 512         new XColor("light coral", 240, 128, 128),
 513         new XColor("light cyan", 224, 255, 255),
 514         new XColor("light goldenrod", 238, 221, 130),
 515         new XColor("light goldenrod yellow", 250, 250, 210),
 516         new XColor("light gray", 211, 211, 211),
 517         new XColor("light green", 144, 238, 144),
 518         new XColor("light grey", 211, 211, 211),
 519         new XColor("light pink", 255, 182, 193),
 520         new XColor("light salmon", 255, 160, 122),
 521         new XColor("light sea green", 32, 178, 170),
 522         new XColor("light sky blue", 135, 206, 250),
 523         new XColor("light slate blue", 132, 112, 255),
 524         new XColor("light slate gray", 119, 136, 153),
 525         new XColor("light slate grey", 119, 136, 153),
 526         new XColor("light steel blue", 176, 196, 222),
 527         new XColor("light yellow", 255, 255, 224),
 528         new XColor("lightblue", 173, 216, 230),
 529         new XColor("lightblue1", 191, 239, 255),
 530         new XColor("lightblue2", 178, 223, 238),
 531         new XColor("lightblue3", 154, 192, 205),
 532         new XColor("lightblue4", 104, 131, 139),
 533         new XColor("lightcoral", 240, 128, 128),
 534         new XColor("lightcyan", 224, 255, 255),
 535         new XColor("lightcyan1", 224, 255, 255),
 536         new XColor("lightcyan2", 209, 238, 238),
 537         new XColor("lightcyan3", 180, 205, 205),
 538         new XColor("lightcyan4", 122, 139, 139),
 539         new XColor("lightgoldenrod", 238, 221, 130),
 540         new XColor("lightgoldenrod1", 255, 236, 139),
 541         new XColor("lightgoldenrod2", 238, 220, 130),
 542         new XColor("lightgoldenrod3", 205, 190, 112),
 543         new XColor("lightgoldenrod4", 139, 129, 76),
 544         new XColor("lightgoldenrodyellow", 250, 250, 210),
 545         new XColor("lightgray", 211, 211, 211),
 546         new XColor("lightgreen", 144, 238, 144),
 547         new XColor("lightgrey", 211, 211, 211),
 548         new XColor("lightpink", 255, 182, 193),
 549         new XColor("lightpink1", 255, 174, 185),
 550         new XColor("lightpink2", 238, 162, 173),
 551         new XColor("lightpink3", 205, 140, 149),
 552         new XColor("lightpink4", 139, 95, 101),
 553         new XColor("lightsalmon", 255, 160, 122),
 554         new XColor("lightsalmon1", 255, 160, 122),
 555         new XColor("lightsalmon2", 238, 149, 114),
 556         new XColor("lightsalmon3", 205, 129, 98),
 557         new XColor("lightsalmon4", 139, 87, 66),
 558         new XColor("lightseagreen", 32, 178, 170),
 559         new XColor("lightskyblue", 135, 206, 250),
 560         new XColor("lightskyblue1", 176, 226, 255),
 561         new XColor("lightskyblue2", 164, 211, 238),
 562         new XColor("lightskyblue3", 141, 182, 205),
 563         new XColor("lightskyblue4", 96, 123, 139),
 564         new XColor("lightslateblue", 132, 112, 255),
 565         new XColor("lightslategray", 119, 136, 153),
 566         new XColor("lightslategrey", 119, 136, 153),
 567         new XColor("lightsteelblue", 176, 196, 222),
 568         new XColor("lightsteelblue1", 202, 225, 255),
 569         new XColor("lightsteelblue2", 188, 210, 238),
 570         new XColor("lightsteelblue3", 162, 181, 205),
 571         new XColor("lightsteelblue4", 110, 123, 139),
 572         new XColor("lightyellow", 255, 255, 224),
 573         new XColor("lightyellow1", 255, 255, 224),
 574         new XColor("lightyellow2", 238, 238, 209),
 575         new XColor("lightyellow3", 205, 205, 180),
 576         new XColor("lightyellow4", 139, 139, 122),
 577         new XColor("lime green", 50, 205, 50),
 578         new XColor("limegreen", 50, 205, 50),
 579         new XColor("linen", 250, 240, 230),
 580         new XColor("magenta", 255, 0, 255),
 581         new XColor("magenta1", 255, 0, 255),
 582         new XColor("magenta2", 238, 0, 238),
 583         new XColor("magenta3", 205, 0, 205),
 584         new XColor("magenta4", 139, 0, 139),
 585         new XColor("maroon", 176, 48, 96),
 586         new XColor("maroon1", 255, 52, 179),
 587         new XColor("maroon2", 238, 48, 167),
 588         new XColor("maroon3", 205, 41, 144),
 589         new XColor("maroon4", 139, 28, 98),
 590         new XColor("medium aquamarine", 102, 205, 170),
 591         new XColor("medium blue", 0, 0, 205),
 592         new XColor("medium orchid", 186, 85, 211),
 593         new XColor("medium purple", 147, 112, 219),
 594         new XColor("medium sea green", 60, 179, 113),
 595         new XColor("medium slate blue", 123, 104, 238),
 596         new XColor("medium spring green", 0, 250, 154),
 597         new XColor("medium turquoise", 72, 209, 204),
 598         new XColor("medium violet red", 199, 21, 133),
 599         new XColor("mediumaquamarine", 102, 205, 170),
 600         new XColor("mediumblue", 0, 0, 205),
 601         new XColor("mediumorchid", 186, 85, 211),
 602         new XColor("mediumorchid1", 224, 102, 255),
 603         new XColor("mediumorchid2", 209, 95, 238),
 604         new XColor("mediumorchid3", 180, 82, 205),
 605         new XColor("mediumorchid4", 122, 55, 139),
 606         new XColor("mediumpurple", 147, 112, 219),
 607         new XColor("mediumpurple1", 171, 130, 255),
 608         new XColor("mediumpurple2", 159, 121, 238),
 609         new XColor("mediumpurple3", 137, 104, 205),
 610         new XColor("mediumpurple4", 93, 71, 139),
 611         new XColor("mediumseagreen", 60, 179, 113),
 612         new XColor("mediumslateblue", 123, 104, 238),
 613         new XColor("mediumspringgreen", 0, 250, 154),
 614         new XColor("mediumturquoise", 72, 209, 204),
 615         new XColor("mediumvioletred", 199, 21, 133),
 616         new XColor("midnight blue", 25, 25, 112),
 617         new XColor("midnightblue", 25, 25, 112),
 618         new XColor("mint cream", 245, 255, 250),
 619         new XColor("mintcream", 245, 255, 250),
 620         new XColor("misty rose", 255, 228, 225),
 621         new XColor("mistyrose", 255, 228, 225),
 622         new XColor("mistyrose1", 255, 228, 225),
 623         new XColor("mistyrose2", 238, 213, 210),
 624         new XColor("mistyrose3", 205, 183, 181),
 625         new XColor("mistyrose4", 139, 125, 123),
 626         new XColor("moccasin", 255, 228, 181),
 627         new XColor("navajo white", 255, 222, 173),
 628         new XColor("navajowhite", 255, 222, 173),
 629         new XColor("navajowhite1", 255, 222, 173),
 630         new XColor("navajowhite2", 238, 207, 161),
 631         new XColor("navajowhite3", 205, 179, 139),
 632         new XColor("navajowhite4", 139, 121, 94),
 633         new XColor("navy", 0, 0, 128),
 634         new XColor("navy blue", 0, 0, 128),
 635         new XColor("navyblue", 0, 0, 128),
 636         new XColor("old lace", 253, 245, 230),
 637         new XColor("oldlace", 253, 245, 230),
 638         new XColor("olive drab", 107, 142, 35),
 639         new XColor("olivedrab", 107, 142, 35),
 640         new XColor("olivedrab1", 192, 255, 62),
 641         new XColor("olivedrab2", 179, 238, 58),
 642         new XColor("olivedrab3", 154, 205, 50),
 643         new XColor("olivedrab4", 105, 139, 34),
 644         new XColor("orange", 255, 165, 0),
 645         new XColor("orange red", 255, 69, 0),
 646         new XColor("orange1", 255, 165, 0),
 647         new XColor("orange2", 238, 154, 0),
 648         new XColor("orange3", 205, 133, 0),
 649         new XColor("orange4", 139, 90, 0),
 650         new XColor("orangered", 255, 69, 0),
 651         new XColor("orangered1", 255, 69, 0),
 652         new XColor("orangered2", 238, 64, 0),
 653         new XColor("orangered3", 205, 55, 0),
 654         new XColor("orangered4", 139, 37, 0),
 655         new XColor("orchid", 218, 112, 214),
 656         new XColor("orchid1", 255, 131, 250),
 657         new XColor("orchid2", 238, 122, 233),
 658         new XColor("orchid3", 205, 105, 201),
 659         new XColor("orchid4", 139, 71, 137),
 660         new XColor("pale goldenrod", 238, 232, 170),
 661         new XColor("pale green", 152, 251, 152),
 662         new XColor("pale turquoise", 175, 238, 238),
 663         new XColor("pale violet red", 219, 112, 147),
 664         new XColor("palegoldenrod", 238, 232, 170),
 665         new XColor("palegreen", 152, 251, 152),
 666         new XColor("palegreen1", 154, 255, 154),
 667         new XColor("palegreen2", 144, 238, 144),
 668         new XColor("palegreen3", 124, 205, 124),
 669         new XColor("palegreen4", 84, 139, 84),
 670         new XColor("paleturquoise", 175, 238, 238),
 671         new XColor("paleturquoise1", 187, 255, 255),
 672         new XColor("paleturquoise2", 174, 238, 238),
 673         new XColor("paleturquoise3", 150, 205, 205),
 674         new XColor("paleturquoise4", 102, 139, 139),
 675         new XColor("palevioletred", 219, 112, 147),
 676         new XColor("palevioletred1", 255, 130, 171),
 677         new XColor("palevioletred2", 238, 121, 159),
 678         new XColor("palevioletred3", 205, 104, 137),
 679         new XColor("palevioletred4", 139, 71, 93),
 680         new XColor("papaya whip", 255, 239, 213),
 681         new XColor("papayawhip", 255, 239, 213),
 682         new XColor("peach puff", 255, 218, 185),
 683         new XColor("peachpuff", 255, 218, 185),
 684         new XColor("peachpuff1", 255, 218, 185),
 685         new XColor("peachpuff2", 238, 203, 173),
 686         new XColor("peachpuff3", 205, 175, 149),
 687         new XColor("peachpuff4", 139, 119, 101),
 688         new XColor("peru", 205, 133, 63),
 689         new XColor("pink", 255, 192, 203),
 690         new XColor("pink1", 255, 181, 197),
 691         new XColor("pink2", 238, 169, 184),
 692         new XColor("pink3", 205, 145, 158),
 693         new XColor("pink4", 139, 99, 108),
 694         new XColor("plum", 221, 160, 221),
 695         new XColor("plum1", 255, 187, 255),
 696         new XColor("plum2", 238, 174, 238),
 697         new XColor("plum3", 205, 150, 205),
 698         new XColor("plum4", 139, 102, 139),
 699         new XColor("powder blue", 176, 224, 230),
 700         new XColor("powderblue", 176, 224, 230),
 701         new XColor("purple", 160, 32, 240),
 702         new XColor("purple1", 155, 48, 255),
 703         new XColor("purple2", 145, 44, 238),
 704         new XColor("purple3", 125, 38, 205),
 705         new XColor("purple4", 85, 26, 139),
 706         new XColor("red", 255, 0, 0),
 707         new XColor("red1", 255, 0, 0),
 708         new XColor("red2", 238, 0, 0),
 709         new XColor("red3", 205, 0, 0),
 710         new XColor("red4", 139, 0, 0),
 711         new XColor("rosy brown", 188, 143, 143),
 712         new XColor("rosybrown", 188, 143, 143),
 713         new XColor("rosybrown1", 255, 193, 193),
 714         new XColor("rosybrown2", 238, 180, 180),
 715         new XColor("rosybrown3", 205, 155, 155),
 716         new XColor("rosybrown4", 139, 105, 105),
 717         new XColor("royal blue", 65, 105, 225),
 718         new XColor("royalblue", 65, 105, 225),
 719         new XColor("royalblue1", 72, 118, 255),
 720         new XColor("royalblue2", 67, 110, 238),
 721         new XColor("royalblue3", 58, 95, 205),
 722         new XColor("royalblue4", 39, 64, 139),
 723         new XColor("saddle brown", 139, 69, 19),
 724         new XColor("saddlebrown", 139, 69, 19),
 725         new XColor("salmon", 250, 128, 114),
 726         new XColor("salmon1", 255, 140, 105),
 727         new XColor("salmon2", 238, 130, 98),
 728         new XColor("salmon3", 205, 112, 84),
 729         new XColor("salmon4", 139, 76, 57),
 730         new XColor("sandy brown", 244, 164, 96),
 731         new XColor("sandybrown", 244, 164, 96),
 732         new XColor("sea green", 46, 139, 87),
 733         new XColor("seagreen", 46, 139, 87),
 734         new XColor("seagreen1", 84, 255, 159),
 735         new XColor("seagreen2", 78, 238, 148),
 736         new XColor("seagreen3", 67, 205, 128),
 737         new XColor("seagreen4", 46, 139, 87),
 738         new XColor("seashell", 255, 245, 238),
 739         new XColor("seashell1", 255, 245, 238),
 740         new XColor("seashell2", 238, 229, 222),
 741         new XColor("seashell3", 205, 197, 191),
 742         new XColor("seashell4", 139, 134, 130),
 743         new XColor("sienna", 160, 82, 45),
 744         new XColor("sienna1", 255, 130, 71),
 745         new XColor("sienna2", 238, 121, 66),
 746         new XColor("sienna3", 205, 104, 57),
 747         new XColor("sienna4", 139, 71, 38),
 748         new XColor("sky blue", 135, 206, 235),
 749         new XColor("skyblue", 135, 206, 235),
 750         new XColor("skyblue1", 135, 206, 255),
 751         new XColor("skyblue2", 126, 192, 238),
 752         new XColor("skyblue3", 108, 166, 205),
 753         new XColor("skyblue4", 74, 112, 139),
 754         new XColor("slate blue", 106, 90, 205),
 755         new XColor("slate gray", 112, 128, 144),
 756         new XColor("slate grey", 112, 128, 144),
 757         new XColor("slateblue", 106, 90, 205),
 758         new XColor("slateblue1", 131, 111, 255),
 759         new XColor("slateblue2", 122, 103, 238),
 760         new XColor("slateblue3", 105, 89, 205),
 761         new XColor("slateblue4", 71, 60, 139),
 762         new XColor("slategray", 112, 128, 144),
 763         new XColor("slategray1", 198, 226, 255),
 764         new XColor("slategray2", 185, 211, 238),
 765         new XColor("slategray3", 159, 182, 205),
 766         new XColor("slategray4", 108, 123, 139),
 767         new XColor("slategrey", 112, 128, 144),
 768         new XColor("snow", 255, 250, 250),
 769         new XColor("snow1", 255, 250, 250),
 770         new XColor("snow2", 238, 233, 233),
 771         new XColor("snow3", 205, 201, 201),
 772         new XColor("snow4", 139, 137, 137),
 773         new XColor("spring green", 0, 255, 127),
 774         new XColor("springgreen", 0, 255, 127),
 775         new XColor("springgreen1", 0, 255, 127),
 776         new XColor("springgreen2", 0, 238, 118),
 777         new XColor("springgreen3", 0, 205, 102),
 778         new XColor("springgreen4", 0, 139, 69),
 779         new XColor("steel blue", 70, 130, 180),
 780         new XColor("steelblue", 70, 130, 180),
 781         new XColor("steelblue1", 99, 184, 255),
 782         new XColor("steelblue2", 92, 172, 238),
 783         new XColor("steelblue3", 79, 148, 205),
 784         new XColor("steelblue4", 54, 100, 139),
 785         new XColor("tan", 210, 180, 140),
 786         new XColor("tan1", 255, 165, 79),
 787         new XColor("tan2", 238, 154, 73),
 788         new XColor("tan3", 205, 133, 63),
 789         new XColor("tan4", 139, 90, 43),
 790         new XColor("thistle", 216, 191, 216),
 791         new XColor("thistle1", 255, 225, 255),
 792         new XColor("thistle2", 238, 210, 238),
 793         new XColor("thistle3", 205, 181, 205),
 794         new XColor("thistle4", 139, 123, 139),
 795         new XColor("tomato", 255, 99, 71),
 796         new XColor("tomato1", 255, 99, 71),
 797         new XColor("tomato2", 238, 92, 66),
 798         new XColor("tomato3", 205, 79, 57),
 799         new XColor("tomato4", 139, 54, 38),
 800         new XColor("turquoise", 64, 224, 208),
 801         new XColor("turquoise1", 0, 245, 255),
 802         new XColor("turquoise2", 0, 229, 238),
 803         new XColor("turquoise3", 0, 197, 205),
 804         new XColor("turquoise4", 0, 134, 139),
 805         new XColor("violet", 238, 130, 238),
 806         new XColor("violet red", 208, 32, 144),
 807         new XColor("violetred", 208, 32, 144),
 808         new XColor("violetred1", 255, 62, 150),
 809         new XColor("violetred2", 238, 58, 140),
 810         new XColor("violetred3", 205, 50, 120),
 811         new XColor("violetred4", 139, 34, 82),
 812         new XColor("wheat", 245, 222, 179),
 813         new XColor("wheat1", 255, 231, 186),
 814         new XColor("wheat2", 238, 216, 174),
 815         new XColor("wheat3", 205, 186, 150),
 816         new XColor("wheat4", 139, 126, 102),
 817         new XColor("white", 255, 255, 255),
 818         new XColor("white smoke", 245, 245, 245),
 819         new XColor("whitesmoke", 245, 245, 245),
 820         new XColor("yellow", 255, 255, 0),
 821         new XColor("yellow green", 154, 205, 50),
 822         new XColor("yellow1", 255, 255, 0),
 823         new XColor("yellow2", 238, 238, 0),
 824         new XColor("yellow3", 205, 205, 0),
 825         new XColor("yellow4", 139, 139, 0),
 826         new XColor("yellowgreen", 154, 205, 5)
 827     };
 828 
 829 }