/*
 * @(#)Colors.java    2.3  25 August 2005
 *
 * Copyright 2005
 * College of Computer and Information Science
 * Northeastern University
 * Boston, MA  02115
 *
 * The Java Power Tools software may be used for educational
 * purposes as long as this copyright notice is retained intact
 * at the top of all source files.
 *
 * To discuss possible commercial use of this software, 
 * contact Richard Rasala at Northeastern University, 
 * College of Computer and Information Science,
 * 617-373-2462 or rasala@ccs.neu.edu.
 *
 * The Java Power Tools software has been designed and built
 * in collaboration with Viera Proulx and Jeff Raab.
 *
 * Should this software be modified, the words "Modified from 
 * Original" must be included as a comment below this notice.
 *
 * All publication rights are retained.  This software or its 
 * documentation may not be published in any media either
 * in whole or in part without explicit permission.
 *
 * This software was created with support from Northeastern 
 * University and from NSF grant DUE-9950829.
 */

package edu.neu.ccs;

import edu.neu.ccs.quick.*;

import java.awt.*;
import java.util.*;
import javax.swing.*;

/**
 * <p>Class <code>Colors</code contains a set of static Color
 * objects named according to current web color conventions
 * together with static data and methods that deal with and
 * identify named color objects.</p>
 *
 * <p>Class <code>Colors</code> cannot be instantiated.</p>
 *
 * <p>This class replaces the class <code>ColorNames</code>
 * which has been removed from the JPT.</p>
 *
 * @author  Richard Rasala
 * @version 2.4.0
 * @since   2.3.2
 */
public class Colors {

    private Colors() { }
    
    /** Color AliceBlue              = 240, 248, 255      = #F0F8FF. */
    public static final Color AliceBlue = new Color(240, 248, 255);

    /** Color aliceblue = AliceBlue. */
    public static final Color aliceblue = AliceBlue;

    /** Color AntiqueWhite           = 250, 235, 215      = #FAEBD7. */
    public static final Color AntiqueWhite = new Color(250, 235, 215);

    /** Color antiquewhite = AntiqueWhite. */
    public static final Color antiquewhite = AntiqueWhite;

    /** Color Aqua                   =   0, 255, 255      = #00FFFF. */
    public static final Color Aqua = new Color(  0, 255, 255);

    /** Color aqua = Aqua. */
    public static final Color aqua = Aqua;

    /** Color Aquamarine             = 127, 255, 212      = #7FFFD4. */
    public static final Color Aquamarine = new Color(127, 255, 212);

    /** Color aquamarine = Aquamarine. */
    public static final Color aquamarine = Aquamarine;

    /** Color Azure                  = 240, 255, 255      = #F0FFFF. */
    public static final Color Azure = new Color(240, 255, 255);

    /** Color azure = Azure. */
    public static final Color azure = Azure;

    /**
     * <p>Color Background = The default Background in this UI.</p>
     *
     * <p>Computed as <code>new JLabel().getBackground()</code>.</p>
     */
    public static final Color Background = new JLabel().getBackground();
    
    /** Color background = Background. */
    public static final Color background = Background;
    
    /** Color Beige                  = 245, 245, 220      = #F5F5DC. */
    public static final Color Beige = new Color(245, 245, 220);

    /** Color beige = Beige. */
    public static final Color beige = Beige;

    /** Color Bisque                 = 255, 228, 196      = #FFE4C4. */
    public static final Color Bisque = new Color(255, 228, 196);

    /** Color bisque = Bisque. */
    public static final Color bisque = Bisque;

    /** Color Black                  =   0,   0,   0      = #000000. */
    public static final Color Black = new Color(  0,   0,   0);

    /** Color black = Black. */
    public static final Color black = Black;

    /** Color BlanchedAlmond         = 255, 235, 205      = #FFEBCD. */
    public static final Color BlanchedAlmond = new Color(255, 235, 205);

    /** Color blanchedalmond = BlanchedAlmond. */
    public static final Color blanchedalmond = BlanchedAlmond;

    /** Color Blue                   =   0,   0, 255      = #0000FF. */
    public static final Color Blue = new Color(  0,   0, 255);

    /** Color blue = Blue. */
    public static final Color blue = Blue;

    /** Color BlueViolet             = 138,  43, 226      = #8A2BE2. */
    public static final Color BlueViolet = new Color(138,  43, 226);

    /** Color blueviolet = BlueViolet. */
    public static final Color blueviolet = BlueViolet;

    /** Color Brown                  = 165,  42,  42      = #A52A2A. */
    public static final Color Brown = new Color(165,  42,  42);

    /** Color brown = Brown. */
    public static final Color brown = Brown;

    /** Color BurlyWood              = 222, 184, 135      = #DEB887. */
    public static final Color BurlyWood = new Color(222, 184, 135);

    /** Color burlywood = BurlyWood. */
    public static final Color burlywood = BurlyWood;

    /** Color CadetBlue              =  95, 158, 160      = #5F9EA0. */
    public static final Color CadetBlue = new Color( 95, 158, 160);

    /** Color cadetblue = CadetBlue. */
    public static final Color cadetblue = CadetBlue;

    /** Color Chartreuse             = 127, 255,   0      = #7FFF00. */
    public static final Color Chartreuse = new Color(127, 255,   0);

    /** Color chartreuse = Chartreuse. */
    public static final Color chartreuse = Chartreuse;

    /** Color Chocolate              = 210, 105,  30      = #D2691E. */
    public static final Color Chocolate = new Color(210, 105,  30);

    /** Color chocolate = Chocolate. */
    public static final Color chocolate = Chocolate;

    /** Color Coral                  = 255, 127,  80      = #FF7F50. */
    public static final Color Coral = new Color(255, 127,  80);

    /** Color coral = Coral. */
    public static final Color coral = Coral;

    /** Color CornflowerBlue         = 100, 149, 237      = #6495ED. */
    public static final Color CornflowerBlue = new Color(100, 149, 237);

    /** Color cornflowerblue = CornflowerBlue. */
    public static final Color cornflowerblue = CornflowerBlue;

    /** Color Cornsilk               = 255, 248, 220      = #FFF8DC. */
    public static final Color Cornsilk = new Color(255, 248, 220);

    /** Color cornsilk = Cornsilk. */
    public static final Color cornsilk = Cornsilk;

    /** Color Crimson                = 220,  20,  60      = #DC143C. */
    public static final Color Crimson = new Color(220,  20,  60);

    /** Color crimson = Crimson. */
    public static final Color crimson = Crimson;

    /** Color Cyan                   =   0, 255, 255      = #00FFFF. */
    public static final Color Cyan = new Color(  0, 255, 255);

    /** Color cyan = Cyan. */
    public static final Color cyan = Cyan;

    /** Color DarkBlue               =   0,   0, 139      = #00008B. */
    public static final Color DarkBlue = new Color(  0,   0, 139);

    /** Color darkblue = DarkBlue. */
    public static final Color darkblue = DarkBlue;

    /** Color DarkCyan               =   0, 139, 139      = #008B8B. */
    public static final Color DarkCyan = new Color(  0, 139, 139);

    /** Color darkcyan = DarkCyan. */
    public static final Color darkcyan = DarkCyan;

    /** Color DarkGoldenrod          = 184, 134,  11      = #B8860B. */
    public static final Color DarkGoldenrod = new Color(184, 134,  11);

    /** Color darkgoldenrod = DarkGoldenrod. */
    public static final Color darkgoldenrod = DarkGoldenrod;

    /** Color DarkGray               = 169, 169, 169      = #A9A9A9. */
    public static final Color DarkGray = new Color(169, 169, 169);

    /** Color darkgray = DarkGray. */
    public static final Color darkgray = DarkGray;

    /** Color DarkGreen              =   0, 100,   0      = #006400. */
    public static final Color DarkGreen = new Color(  0, 100,   0);

    /** Color darkgreen = DarkGreen. */
    public static final Color darkgreen = DarkGreen;

    /** Color DarkKhaki              = 189, 183, 107      = #BDB76B. */
    public static final Color DarkKhaki = new Color(189, 183, 107);

    /** Color darkkhaki = DarkKhaki. */
    public static final Color darkkhaki = DarkKhaki;

    /** Color DarkMagenta            = 139,   0, 139      = #8B008B. */
    public static final Color DarkMagenta = new Color(139,   0, 139);

    /** Color darkmagenta = DarkMagenta. */
    public static final Color darkmagenta = DarkMagenta;

    /** Color DarkOliveGreen         =  85, 107,  47      = #556B2F. */
    public static final Color DarkOliveGreen = new Color( 85, 107,  47);

    /** Color darkolivegreen = DarkOliveGreen. */
    public static final Color darkolivegreen = DarkOliveGreen;

    /** Color DarkOrange             = 255, 140,   0      = #FF8C00. */
    public static final Color DarkOrange = new Color(255, 140,   0);

    /** Color darkorange = DarkOrange. */
    public static final Color darkorange = DarkOrange;

    /** Color DarkOrchid             = 153,  50, 204      = #9932CC. */
    public static final Color DarkOrchid = new Color(153,  50, 204);

    /** Color darkorchid = DarkOrchid. */
    public static final Color darkorchid = DarkOrchid;

    /** Color DarkRed                = 139,   0,   0      = #8B0000. */
    public static final Color DarkRed = new Color(139,   0,   0);

    /** Color darkred = DarkRed. */
    public static final Color darkred = DarkRed;

    /** Color DarkSalmon             = 233, 150, 122      = #E9967A. */
    public static final Color DarkSalmon = new Color(233, 150, 122);

    /** Color darksalmon = DarkSalmon. */
    public static final Color darksalmon = DarkSalmon;

    /** Color DarkSeaGreen           = 143, 188, 139      = #8FBC8B. */
    public static final Color DarkSeaGreen = new Color(143, 188, 139);

    /** Color darkseagreen = DarkSeaGreen. */
    public static final Color darkseagreen = DarkSeaGreen;

    /** Color DarkSlateBlue          =  72,  61, 139      = #483D8B. */
    public static final Color DarkSlateBlue = new Color( 72,  61, 139);

    /** Color darkslateblue = DarkSlateBlue. */
    public static final Color darkslateblue = DarkSlateBlue;

    /** Color DarkSlateGray          =  47,  79,  79      = #2F4F4F. */
    public static final Color DarkSlateGray = new Color( 47,  79,  79);

    /** Color darkslategray = DarkSlateGray. */
    public static final Color darkslategray = DarkSlateGray;

    /** Color DarkTurquoise          =   0, 206, 209      = #00CED1. */
    public static final Color DarkTurquoise = new Color(  0, 206, 209);

    /** Color darkturquoise = DarkTurquoise. */
    public static final Color darkturquoise = DarkTurquoise;

    /** Color DarkViolet             = 148,   0, 211      = #9400D3. */
    public static final Color DarkViolet = new Color(148,   0, 211);

    /** Color darkviolet = DarkViolet. */
    public static final Color darkviolet = DarkViolet;

    /** Color DeepPink               = 255,  20, 147      = #FF1493. */
    public static final Color DeepPink = new Color(255,  20, 147);

    /** Color deeppink = DeepPink. */
    public static final Color deeppink = DeepPink;

    /** Color DeepSkyBlue            =   0, 191, 255      = #00BFFF. */
    public static final Color DeepSkyBlue = new Color(  0, 191, 255);

    /** Color deepskyblue = DeepSkyBlue. */
    public static final Color deepskyblue = DeepSkyBlue;

    /** Color DimGray                = 105, 105, 105      = #696969. */
    public static final Color DimGray = new Color(105, 105, 105);

    /** Color dimgray = DimGray. */
    public static final Color dimgray = DimGray;

    /** Color DodgerBlue             =  30, 144, 255      = #1E90FF. */
    public static final Color DodgerBlue = new Color( 30, 144, 255);

    /** Color dodgerblue = DodgerBlue. */
    public static final Color dodgerblue = DodgerBlue;

    /** Color Firebrick              = 178,  34,  34      = #B22222. */
    public static final Color Firebrick = new Color(178,  34,  34);

    /** Color firebrick = Firebrick. */
    public static final Color firebrick = Firebrick;

    /** Color FloralWhite            = 255, 250, 240      = #FFFAF0. */
    public static final Color FloralWhite = new Color(255, 250, 240);

    /** Color floralwhite = FloralWhite. */
    public static final Color floralwhite = FloralWhite;

    /** Color ForestGreen            =  34, 139,  34      = #228B22. */
    public static final Color ForestGreen = new Color( 34, 139,  34);

    /** Color forestgreen = ForestGreen. */
    public static final Color forestgreen = ForestGreen;

    /** Color Fuchsia                = 255,   0, 255      = #FF00FF. */
    public static final Color Fuchsia = new Color(255,   0, 255);

    /** Color fuchsia = Fuchsia. */
    public static final Color fuchsia = Fuchsia;

    /** Color Gainsboro              = 220, 220, 220      = #DCDCDC. */
    public static final Color Gainsboro = new Color(220, 220, 220);

    /** Color gainsboro = Gainsboro. */
    public static final Color gainsboro = Gainsboro;

    /** Color GhostWhite             = 248, 248, 255      = #F8F8FF. */
    public static final Color GhostWhite = new Color(248, 248, 255);

    /** Color ghostwhite = GhostWhite. */
    public static final Color ghostwhite = GhostWhite;

    /** Color Gold                   = 255, 215,   0      = #FFD700. */
    public static final Color Gold = new Color(255, 215,   0);

    /** Color gold = Gold. */
    public static final Color gold = Gold;

    /** Color Goldenrod              = 218, 165,  32      = #DAA520. */
    public static final Color Goldenrod = new Color(218, 165,  32);

    /** Color goldenrod = Goldenrod. */
    public static final Color goldenrod = Goldenrod;

    /** Color Gray                   = 128, 128, 128      = #808080. */
    public static final Color Gray = new Color(128, 128, 128);

    /** Color gray = Gray. */
    public static final Color gray = Gray;

    /** Color Green                  =   0, 128,   0      = #008000.
     *
     * <p>Warning: The definition of Green as 0, 128, 0 follows current
     * conventions on the web.  The color Lime is 0, 255, 0.</p>
     */
    public static final Color Green = new Color(  0, 128,   0);

    /** Color green = Green.
     *
     * <p>Warning: The definition of Green as 0, 128, 0 follows current
     * conventions on the web.  The color Lime is 0, 255, 0.</p>
     */
    public static final Color green = Green;

    /** Color GreenYellow            = 173, 255,  47      = #ADFF2F. */
    public static final Color GreenYellow = new Color(173, 255,  47);

    /** Color greenyellow = GreenYellow. */
    public static final Color greenyellow = GreenYellow;

    /** Color Honeydew               = 240, 255, 240      = #F0FFF0. */
    public static final Color Honeydew = new Color(240, 255, 240);

    /** Color honeydew = Honeydew. */
    public static final Color honeydew = Honeydew;

    /** Color HotPink                = 255, 105, 180      = #FF69B4. */
    public static final Color HotPink = new Color(255, 105, 180);

    /** Color hotpink = HotPink. */
    public static final Color hotpink = HotPink;

    /** Color IndianRed              = 205,  92,  92      = #CD5C5C. */
    public static final Color IndianRed = new Color(205,  92,  92);

    /** Color indianred = IndianRed. */
    public static final Color indianred = IndianRed;

    /** Color Indigo                 =  75,   0, 130      = #4B0082. */
    public static final Color Indigo = new Color( 75,   0, 130);

    /** Color indigo = Indigo. */
    public static final Color indigo = Indigo;

    /** Color Ivory                  = 255, 255, 240      = #FFFFF0. */
    public static final Color Ivory = new Color(255, 255, 240);

    /** Color ivory = Ivory. */
    public static final Color ivory = Ivory;

    /** Color Khaki                  = 240, 230, 140      = #F0E68C. */
    public static final Color Khaki = new Color(240, 230, 140);

    /** Color khaki = Khaki. */
    public static final Color khaki = Khaki;

    /** Color Lavender               = 230, 230, 250      = #E6E6FA. */
    public static final Color Lavender = new Color(230, 230, 250);

    /** Color lavender = Lavender. */
    public static final Color lavender = Lavender;

    /** Color LavenderBlush          = 255, 240, 245      = #FFF0F5. */
    public static final Color LavenderBlush = new Color(255, 240, 245);

    /** Color lavenderblush = LavenderBlush. */
    public static final Color lavenderblush = LavenderBlush;

    /** Color LawnGreen              = 124, 252,   0      = #7CFC00. */
    public static final Color LawnGreen = new Color(124, 252,   0);

    /** Color lawngreen = LawnGreen. */
    public static final Color lawngreen = LawnGreen;

    /** Color LemonChiffon           = 255, 250, 205      = #FFFACD. */
    public static final Color LemonChiffon = new Color(255, 250, 205);

    /** Color lemonchiffon = LemonChiffon. */
    public static final Color lemonchiffon = LemonChiffon;

    /** Color LightBlue              = 173, 216, 230      = #ADD8E6. */
    public static final Color LightBlue = new Color(173, 216, 230);

    /** Color lightblue = LightBlue. */
    public static final Color lightblue = LightBlue;

    /** Color LightCoral             = 240, 128, 128      = #F08080. */
    public static final Color LightCoral = new Color(240, 128, 128);

    /** Color lightcoral = LightCoral. */
    public static final Color lightcoral = LightCoral;

    /** Color LightCyan              = 224, 255, 255      = #E0FFFF. */
    public static final Color LightCyan = new Color(224, 255, 255);

    /** Color lightcyan = LightCyan. */
    public static final Color lightcyan = LightCyan;

    /** Color LightGoldenrodYellow   = 250, 250, 210      = #FAFAD2. */
    public static final Color LightGoldenrodYellow = new Color(250, 250, 210);

    /** Color lightgoldenrodyellow = LightGoldenrodYellow. */
    public static final Color lightgoldenrodyellow = LightGoldenrodYellow;

    /** Color LightGray              = 211, 211, 211      = #D3D3D3. */
    public static final Color LightGray = new Color(211, 211, 211);

    /** Color lightgray = LightGray. */
    public static final Color lightgray = LightGray;

    /** Color LightGreen             = 144, 238, 144      = #90EE90. */
    public static final Color LightGreen = new Color(144, 238, 144);

    /** Color lightgreen = LightGreen. */
    public static final Color lightgreen = LightGreen;

    /** Color LightPink              = 255, 182, 193      = #FFB6C1. */
    public static final Color LightPink = new Color(255, 182, 193);

    /** Color lightpink = LightPink. */
    public static final Color lightpink = LightPink;

    /** Color LightSalmon            = 255, 160, 122      = #FFA07A. */
    public static final Color LightSalmon = new Color(255, 160, 122);

    /** Color lightsalmon = LightSalmon. */
    public static final Color lightsalmon = LightSalmon;

    /** Color LightSeaGreen          =  32, 178, 170      = #20B2AA. */
    public static final Color LightSeaGreen = new Color( 32, 178, 170);

    /** Color lightseagreen = LightSeaGreen. */
    public static final Color lightseagreen = LightSeaGreen;

    /** Color LightSkyBlue           = 135, 206, 250      = #87CEFA. */
    public static final Color LightSkyBlue = new Color(135, 206, 250);

    /** Color lightskyblue = LightSkyBlue. */
    public static final Color lightskyblue = LightSkyBlue;

    /** Color LightSlateGray         = 119, 136, 153      = #778899. */
    public static final Color LightSlateGray = new Color(119, 136, 153);

    /** Color lightslategray = LightSlateGray. */
    public static final Color lightslategray = LightSlateGray;

    /** Color LightSteelBlue         = 176, 196, 222      = #B0C4DE. */
    public static final Color LightSteelBlue = new Color(176, 196, 222);

    /** Color lightsteelblue = LightSteelBlue. */
    public static final Color lightsteelblue = LightSteelBlue;

    /** Color LightYellow            = 255, 255, 224      = #FFFFE0. */
    public static final Color LightYellow = new Color(255, 255, 224);

    /** Color lightyellow = LightYellow. */
    public static final Color lightyellow = LightYellow;

    /** Color Lime                   =   0, 255,   0      = #00FF00.
     *
     * <p>The color Lime is 0, 255, 0 which is the traditional definition
     * of the color Green.  However, following current conventions on the
     * web, Green is defined here as 0, 128, 0.</p>
     */
    public static final Color Lime = new Color(  0, 255,   0);

    /** Color lime = Lime.
     *
     * <p>The color Lime is 0, 255, 0 which is the traditional definition
     * of the color Green.  However, following current conventions on the
     * web, Green is defined here as 0, 128, 0.</p>
     */
    public static final Color lime = Lime;

    /** Color LimeGreen              =  50, 205,  50      = #32CD32. */
    public static final Color LimeGreen = new Color( 50, 205,  50);

    /** Color limegreen = LimeGreen. */
    public static final Color limegreen = LimeGreen;

    /** Color Linen                  = 250, 240, 230      = #FAF0E6. */
    public static final Color Linen = new Color(250, 240, 230);

    /** Color linen = Linen. */
    public static final Color linen = Linen;

    /** Color Magenta                = 255,   0, 255      = #FF00FF. */
    public static final Color Magenta = new Color(255,   0, 255);

    /** Color magenta = Magenta. */
    public static final Color magenta = Magenta;

    /** Color Maroon                 = 128,   0,   0      = #800000. */
    public static final Color Maroon = new Color(128,   0,   0);

    /** Color maroon = Maroon. */
    public static final Color maroon = Maroon;

    /** Color MediumAquamarine       = 102, 205, 170      = #66CDAA. */
    public static final Color MediumAquamarine = new Color(102, 205, 170);

    /** Color mediumaquamarine = MediumAquamarine. */
    public static final Color mediumaquamarine = MediumAquamarine;

    /** Color MediumBlue             =   0,   0, 205      = #0000CD. */
    public static final Color MediumBlue = new Color(  0,   0, 205);

    /** Color mediumblue = MediumBlue. */
    public static final Color mediumblue = MediumBlue;

    /** Color MediumOrchid           = 186,  85, 211      = #BA55D3. */
    public static final Color MediumOrchid = new Color(186,  85, 211);

    /** Color mediumorchid = MediumOrchid. */
    public static final Color mediumorchid = MediumOrchid;

    /** Color MediumPurple           = 147, 112, 219      = #9370DB. */
    public static final Color MediumPurple = new Color(147, 112, 219);

    /** Color mediumpurple = MediumPurple. */
    public static final Color mediumpurple = MediumPurple;

    /** Color MediumSeaGreen         =  60, 179, 113      = #3CB371. */
    public static final Color MediumSeaGreen = new Color( 60, 179, 113);

    /** Color mediumseagreen = MediumSeaGreen. */
    public static final Color mediumseagreen = MediumSeaGreen;

    /** Color MediumSlateBlue        = 123, 104, 238      = #7B68EE. */
    public static final Color MediumSlateBlue = new Color(123, 104, 238);

    /** Color mediumslateblue = MediumSlateBlue. */
    public static final Color mediumslateblue = MediumSlateBlue;

    /** Color MediumSpringGreen      =   0, 250, 154      = #00FA9A. */
    public static final Color MediumSpringGreen = new Color(  0, 250, 154);

    /** Color mediumspringgreen = MediumSpringGreen. */
    public static final Color mediumspringgreen = MediumSpringGreen;

    /** Color MediumTurquoise        =  72, 209, 204      = #48D1CC. */
    public static final Color MediumTurquoise = new Color( 72, 209, 204);

    /** Color mediumturquoise = MediumTurquoise. */
    public static final Color mediumturquoise = MediumTurquoise;

    /** Color MediumVioletRed        = 199,  21, 133      = #C71585. */
    public static final Color MediumVioletRed = new Color(199,  21, 133);

    /** Color mediumvioletred = MediumVioletRed. */
    public static final Color mediumvioletred = MediumVioletRed;

    /** Color MidnightBlue           =  25,  25, 112      = #191970. */
    public static final Color MidnightBlue = new Color( 25,  25, 112);

    /** Color midnightblue = MidnightBlue. */
    public static final Color midnightblue = MidnightBlue;

    /** Color MintCream              = 245, 255, 250      = #F5FFFA. */
    public static final Color MintCream = new Color(245, 255, 250);

    /** Color mintcream = MintCream. */
    public static final Color mintcream = MintCream;

    /** Color MistyRose              = 255, 228, 225      = #FFE4E1. */
    public static final Color MistyRose = new Color(255, 228, 225);

    /** Color mistyrose = MistyRose. */
    public static final Color mistyrose = MistyRose;

    /** Color Moccasin               = 255, 228, 181      = #FFE4B5. */
    public static final Color Moccasin = new Color(255, 228, 181);

    /** Color moccasin = Moccasin. */
    public static final Color moccasin = Moccasin;

    /** Color NavajoWhite            = 255, 222, 173      = #FFDEAD. */
    public static final Color NavajoWhite = new Color(255, 222, 173);

    /** Color navajowhite = NavajoWhite. */
    public static final Color navajowhite = NavajoWhite;

    /** Color Navy                   =   0,   0, 128      = #000080. */
    public static final Color Navy = new Color(  0,   0, 128);

    /** Color navy = Navy. */
    public static final Color navy = Navy;

    /** Color OldLace                = 253, 245, 230      = #FDF5E6. */
    public static final Color OldLace = new Color(253, 245, 230);

    /** Color oldlace = OldLace. */
    public static final Color oldlace = OldLace;

    /** Color Olive                  = 128, 128,   0      = #808000. */
    public static final Color Olive = new Color(128, 128,   0);

    /** Color olive = Olive. */
    public static final Color olive = Olive;

    /** Color OliveDrab              = 107, 142,  35      = #6B8E23. */
    public static final Color OliveDrab = new Color(107, 142,  35);

    /** Color olivedrab = OliveDrab. */
    public static final Color olivedrab = OliveDrab;

    /** Color Orange                 = 255, 165,   0      = #FFA500. */
    public static final Color Orange = new Color(255, 165,   0);

    /** Color orange = Orange. */
    public static final Color orange = Orange;

    /** Color OrangeRed              = 255,  69,   0      = #FF4500. */
    public static final Color OrangeRed = new Color(255,  69,   0);

    /** Color orangered = OrangeRed. */
    public static final Color orangered = OrangeRed;

    /** Color Orchid                 = 218, 112, 214      = #DA70D6. */
    public static final Color Orchid = new Color(218, 112, 214);

    /** Color orchid = Orchid. */
    public static final Color orchid = Orchid;

    /** Color PaleGoldenrod          = 238, 232, 170      = #EEE8AA. */
    public static final Color PaleGoldenrod = new Color(238, 232, 170);

    /** Color palegoldenrod = PaleGoldenrod. */
    public static final Color palegoldenrod = PaleGoldenrod;

    /** Color PaleGreen              = 152, 251, 152      = #98FB98. */
    public static final Color PaleGreen = new Color(152, 251, 152);

    /** Color palegreen = PaleGreen. */
    public static final Color palegreen = PaleGreen;

    /** Color PaleTurquoise          = 175, 238, 238      = #AFEEEE. */
    public static final Color PaleTurquoise = new Color(175, 238, 238);

    /** Color paleturquoise = PaleTurquoise. */
    public static final Color paleturquoise = PaleTurquoise;

    /** Color PaleVioletRed          = 219, 112, 147      = #DB7093. */
    public static final Color PaleVioletRed = new Color(219, 112, 147);

    /** Color palevioletred = PaleVioletRed. */
    public static final Color palevioletred = PaleVioletRed;

    /** Color PapayaWhip             = 255, 239, 213      = #FFEFD5. */
    public static final Color PapayaWhip = new Color(255, 239, 213);

    /** Color papayawhip = PapayaWhip. */
    public static final Color papayawhip = PapayaWhip;

    /** Color PeachPuff              = 255, 218, 185      = #FFDAB9. */
    public static final Color PeachPuff = new Color(255, 218, 185);

    /** Color peachpuff = PeachPuff. */
    public static final Color peachpuff = PeachPuff;

    /** Color Peru                   = 205, 133,  63      = #CD853F. */
    public static final Color Peru = new Color(205, 133,  63);

    /** Color peru = Peru. */
    public static final Color peru = Peru;

    /** Color Pink                   = 255, 192, 203      = #FFC0CB. */
    public static final Color Pink = new Color(255, 192, 203);

    /** Color pink = Pink. */
    public static final Color pink = Pink;

    /** Color Plum                   = 221, 160, 221      = #DDA0DD. */
    public static final Color Plum = new Color(221, 160, 221);

    /** Color plum = Plum. */
    public static final Color plum = Plum;

    /** Color PowderBlue             = 176, 224, 230      = #B0E0E6. */
    public static final Color PowderBlue = new Color(176, 224, 230);

    /** Color powderblue = PowderBlue. */
    public static final Color powderblue = PowderBlue;

    /** Color Purple                 = 128,   0, 128      = #800080. */
    public static final Color Purple = new Color(128,   0, 128);

    /** Color purple = Purple. */
    public static final Color purple = Purple;

    /** Color Red                    = 255,   0,   0      = #FF0000. */
    public static final Color Red = new Color(255,   0,   0);

    /** Color red = Red. */
    public static final Color red = Red;

    /** Color RosyBrown              = 188, 143, 143      = #BC8F8F. */
    public static final Color RosyBrown = new Color(188, 143, 143);

    /** Color rosybrown = RosyBrown. */
    public static final Color rosybrown = RosyBrown;

    /** Color RoyalBlue              =  65, 105, 225      = #4169E1. */
    public static final Color RoyalBlue = new Color( 65, 105, 225);

    /** Color royalblue = RoyalBlue. */
    public static final Color royalblue = RoyalBlue;

    /** Color SaddleBrown            = 139,  69,  19      = #8B4513. */
    public static final Color SaddleBrown = new Color(139,  69,  19);

    /** Color saddlebrown = SaddleBrown. */
    public static final Color saddlebrown = SaddleBrown;

    /** Color Salmon                 = 250, 128, 114      = #FA8072. */
    public static final Color Salmon = new Color(250, 128, 114);

    /** Color salmon = Salmon. */
    public static final Color salmon = Salmon;

    /** Color SandyBrown             = 244, 164,  96      = #F4A460. */
    public static final Color SandyBrown = new Color(244, 164,  96);

    /** Color sandybrown = SandyBrown. */
    public static final Color sandybrown = SandyBrown;

    /** Color SeaGreen               =  46, 139,  87      = #2E8B57. */
    public static final Color SeaGreen = new Color( 46, 139,  87);

    /** Color seagreen = SeaGreen. */
    public static final Color seagreen = SeaGreen;

    /** Color SeaShell               = 255, 245, 238      = #FFF5EE. */
    public static final Color SeaShell = new Color(255, 245, 238);

    /** Color seashell = SeaShell. */
    public static final Color seashell = SeaShell;

    /** Color Sienna                 = 160,  82,  45      = #A0522D. */
    public static final Color Sienna = new Color(160,  82,  45);

    /** Color sienna = Sienna. */
    public static final Color sienna = Sienna;

    /** Color Silver                 = 192, 192, 192      = #C0C0C0. */
    public static final Color Silver = new Color(192, 192, 192);

    /** Color silver = Silver. */
    public static final Color silver = Silver;

    /** Color SkyBlue                = 135, 206, 235      = #87CEEB. */
    public static final Color SkyBlue = new Color(135, 206, 235);

    /** Color skyblue = SkyBlue. */
    public static final Color skyblue = SkyBlue;

    /** Color SlateBlue              = 106,  90, 205      = #6A5ACD. */
    public static final Color SlateBlue = new Color(106,  90, 205);

    /** Color slateblue = SlateBlue. */
    public static final Color slateblue = SlateBlue;

    /** Color SlateGray              = 112, 128, 144      = #708090. */
    public static final Color SlateGray = new Color(112, 128, 144);

    /** Color slategray = SlateGray. */
    public static final Color slategray = SlateGray;

    /** Color Snow                   = 255, 250, 250      = #FFFAFA. */
    public static final Color Snow = new Color(255, 250, 250);

    /** Color snow = Snow. */
    public static final Color snow = Snow;

    /** Color SpringGreen            =   0, 255, 127      = #00FF7F. */
    public static final Color SpringGreen = new Color(  0, 255, 127);

    /** Color springgreen = SpringGreen. */
    public static final Color springgreen = SpringGreen;

    /** Color SteelBlue              =  70, 130, 180      = #4682B4. */
    public static final Color SteelBlue = new Color( 70, 130, 180);

    /** Color steelblue = SteelBlue. */
    public static final Color steelblue = SteelBlue;

    /** Color Tan                    = 210, 180, 140      = #D2B48C. */
    public static final Color Tan = new Color(210, 180, 140);

    /** Color tan = Tan. */
    public static final Color tan = Tan;

    /** Color Teal                   =   0, 128, 128      = #008080. */
    public static final Color Teal = new Color(  0, 128, 128);

    /** Color teal = Teal. */
    public static final Color teal = Teal;

    /** Color Thistle                = 216, 191, 216      = #D8BFD8. */
    public static final Color Thistle = new Color(216, 191, 216);

    /** Color thistle = Thistle. */
    public static final Color thistle = Thistle;

    /** Color Tomato                 = 255,  99,  71      = #FF6347. */
    public static final Color Tomato = new Color(255,  99,  71);

    /** Color tomato = Tomato. */
    public static final Color tomato = Tomato;

    /** Color Transparent            = 255, 255, 255,   0 = #FFFFFF00. */
    public static final Color Transparent = new Color(255, 255, 255,   0);

    /** Color transparent = Transparent. */
    public static final Color transparent = Transparent;

    /** Color Turquoise              =  64, 224, 208      = #40E0D0. */
    public static final Color Turquoise = new Color( 64, 224, 208);

    /** Color turquoise = Turquoise. */
    public static final Color turquoise = Turquoise;

    /** Color Violet                 = 238, 130, 238      = #EE82EE. */
    public static final Color Violet = new Color(238, 130, 238);

    /** Color violet = Violet. */
    public static final Color violet = Violet;

    /** Color Wheat                  = 245, 222, 179      = #F5DEB3. */
    public static final Color Wheat = new Color(245, 222, 179);

    /** Color wheat = Wheat. */
    public static final Color wheat = Wheat;

    /** Color White                  = 255, 255, 255      = #FFFFFF. */
    public static final Color White = new Color(255, 255, 255);

    /** Color white = White. */
    public static final Color white = White;

    /** Color WhiteSmoke             = 245, 245, 245      = #F5F5F5. */
    public static final Color WhiteSmoke = new Color(245, 245, 245);

    /** Color whitesmoke = WhiteSmoke. */
    public static final Color whitesmoke = WhiteSmoke;

    /** Color Yellow                 = 255, 255,   0      = #FFFF00. */
    public static final Color Yellow = new Color(255, 255,   0);

    /** Color yellow = Yellow. */
    public static final Color yellow = Yellow;

    /** Color YellowGreen            = 154, 205,  50      = #9ACD32. */
    public static final Color YellowGreen = new Color(154, 205,  50);

    /** Color yellowgreen = YellowGreen. */
    public static final Color yellowgreen = YellowGreen;


    /** 
     * <p>The array nameArray of initial data for nameColorSet.</p>
     *
     * <p>The names installed in this array may be mixed case but
     * no two names should map to the same all lower case string.</p>
     */
    private static String[] nameArray =
        new  String[] {
            "AliceBlue",
            "AntiqueWhite",
            "Aqua",
            "Aquamarine",
            "Azure",
            "Background",
            "Beige",
            "Bisque",
            "Black",
            "BlanchedAlmond",
            "Blue",
            "BlueViolet",
            "Brown",
            "BurlyWood",
            "CadetBlue",
            "Chartreuse",
            "Chocolate",
            "Coral",
            "CornflowerBlue",
            "Cornsilk",
            "Crimson",
            "Cyan",
            "DarkBlue",
            "DarkCyan",
            "DarkGoldenrod",
            "DarkGray",
            "DarkGreen",
            "DarkKhaki",
            "DarkMagenta",
            "DarkOliveGreen",
            "DarkOrange",
            "DarkOrchid",
            "DarkRed",
            "DarkSalmon",
            "DarkSeaGreen",
            "DarkSlateBlue",
            "DarkSlateGray",
            "DarkTurquoise",
            "DarkViolet",
            "DeepPink",
            "DeepSkyBlue",
            "DimGray",
            "DodgerBlue",
            "Firebrick",
            "FloralWhite",
            "ForestGreen",
            "Fuchsia",
            "Gainsboro",
            "GhostWhite",
            "Gold",
            "Goldenrod",
            "Gray",
            "Green",
            "GreenYellow",
            "Honeydew",
            "HotPink",
            "IndianRed",
            "Indigo",
            "Ivory",
            "Khaki",
            "Lavender",
            "LavenderBlush",
            "LawnGreen",
            "LemonChiffon",
            "LightBlue",
            "LightCoral",
            "LightCyan",
            "LightGoldenrodYellow",
            "LightGray",
            "LightGreen",
            "LightPink",
            "LightSalmon",
            "LightSeaGreen",
            "LightSkyBlue",
            "LightSlateGray",
            "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",
            "Red",
            "RosyBrown",
            "RoyalBlue",
            "SaddleBrown",
            "Salmon",
            "SandyBrown",
            "SeaGreen",
            "SeaShell",
            "Sienna",
            "Silver",
            "SkyBlue",
            "SlateBlue",
            "SlateGray",
            "Snow",
            "SpringGreen",
            "SteelBlue",
            "Tan",
            "Teal",
            "Thistle",
            "Tomato",
            "Transparent",
            "Turquoise",
            "Violet",
            "Wheat",
            "White",
            "WhiteSmoke",
            "Yellow",
            "YellowGreen"
        };    
    
    

    /** 
     * <p>The array lowerCaseNameArray of initial data for
     * lowerCaseNameColorSet.</p>
     *
     * <p>The names in this array must be distinct.</p>
     */
    private static String[] lowerCaseNameArray =
        new  String[] {
            "aliceblue",
            "antiquewhite",
            "aqua",
            "aquamarine",
            "azure",
            "background",
            "beige",
            "bisque",
            "black",
            "blanchedalmond",
            "blue",
            "blueviolet",
            "brown",
            "burlywood",
            "cadetblue",
            "chartreuse",
            "chocolate",
            "coral",
            "cornflowerblue",
            "cornsilk",
            "crimson",
            "cyan",
            "darkblue",
            "darkcyan",
            "darkgoldenrod",
            "darkgray",
            "darkgreen",
            "darkkhaki",
            "darkmagenta",
            "darkolivegreen",
            "darkorange",
            "darkorchid",
            "darkred",
            "darksalmon",
            "darkseagreen",
            "darkslateblue",
            "darkslategray",
            "darkturquoise",
            "darkviolet",
            "deeppink",
            "deepskyblue",
            "dimgray",
            "dodgerblue",
            "firebrick",
            "floralwhite",
            "forestgreen",
            "fuchsia",
            "gainsboro",
            "ghostwhite",
            "gold",
            "goldenrod",
            "gray",
            "green",
            "greenyellow",
            "honeydew",
            "hotpink",
            "indianred",
            "indigo",
            "ivory",
            "khaki",
            "lavender",
            "lavenderblush",
            "lawngreen",
            "lemonchiffon",
            "lightblue",
            "lightcoral",
            "lightcyan",
            "lightgoldenrodyellow",
            "lightgray",
            "lightgreen",
            "lightpink",
            "lightsalmon",
            "lightseagreen",
            "lightskyblue",
            "lightslategray",
            "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",
            "red",
            "rosybrown",
            "royalblue",
            "saddlebrown",
            "salmon",
            "sandybrown",
            "seagreen",
            "seashell",
            "sienna",
            "silver",
            "skyblue",
            "slateblue",
            "slategray",
            "snow",
            "springgreen",
            "steelblue",
            "tan",
            "teal",
            "thistle",
            "tomato",
            "transparent",
            "turquoise",
            "violet",
            "wheat",
            "white",
            "whitesmoke",
            "yellow",
            "yellowgreen"
        };
    
    
    /** 
     * <p>The array nameColorArray of initial data for nameColorMap.</p>
     *
     * <p>The names installed in this array must be in lower case.</p>
     */
    private static Object[][] nameColorArray =
        new  Object[][] {
            { "aliceblue", AliceBlue },
            { "antiquewhite", AntiqueWhite },
            { "aqua", Aqua },
            { "aquamarine", Aquamarine },
            { "azure", Azure },
            { "background", Background },
            { "beige", Beige },
            { "bisque", Bisque },
            { "black", Black },
            { "blanchedalmond", BlanchedAlmond },
            { "blue", Blue },
            { "blueviolet", BlueViolet },
            { "brown", Brown },
            { "burlywood", BurlyWood },
            { "cadetblue", CadetBlue },
            { "chartreuse", Chartreuse },
            { "chocolate", Chocolate },
            { "coral", Coral },
            { "cornflowerblue", CornflowerBlue },
            { "cornsilk", Cornsilk },
            { "crimson", Crimson },
            { "cyan", Cyan },
            { "darkblue", DarkBlue },
            { "darkcyan", DarkCyan },
            { "darkgoldenrod", DarkGoldenrod },
            { "darkgray", DarkGray },
            { "darkgreen", DarkGreen },
            { "darkkhaki", DarkKhaki },
            { "darkmagenta", DarkMagenta },
            { "darkolivegreen", DarkOliveGreen },
            { "darkorange", DarkOrange },
            { "darkorchid", DarkOrchid },
            { "darkred", DarkRed },
            { "darksalmon", DarkSalmon },
            { "darkseagreen", DarkSeaGreen },
            { "darkslateblue", DarkSlateBlue },
            { "darkslategray", DarkSlateGray },
            { "darkturquoise", DarkTurquoise },
            { "darkviolet", DarkViolet },
            { "deeppink", DeepPink },
            { "deepskyblue", DeepSkyBlue },
            { "dimgray", DimGray },
            { "dodgerblue", DodgerBlue },
            { "firebrick", Firebrick },
            { "floralwhite", FloralWhite },
            { "forestgreen", ForestGreen },
            { "fuchsia", Fuchsia },
            { "gainsboro", Gainsboro },
            { "ghostwhite", GhostWhite },
            { "gold", Gold },
            { "goldenrod", Goldenrod },
            { "gray", Gray },
            { "green", Green },
            { "greenyellow", GreenYellow },
            { "honeydew", Honeydew },
            { "hotpink", HotPink },
            { "indianred", IndianRed },
            { "indigo", Indigo },
            { "ivory", Ivory },
            { "khaki", Khaki },
            { "lavender", Lavender },
            { "lavenderblush", LavenderBlush },
            { "lawngreen", LawnGreen },
            { "lemonchiffon", LemonChiffon },
            { "lightblue", LightBlue },
            { "lightcoral", LightCoral },
            { "lightcyan", LightCyan },
            { "lightgoldenrodyellow", LightGoldenrodYellow },
            { "lightgray", LightGray },
            { "lightgreen", LightGreen },
            { "lightpink", LightPink },
            { "lightsalmon", LightSalmon },
            { "lightseagreen", LightSeaGreen },
            { "lightskyblue", LightSkyBlue },
            { "lightslategray", LightSlateGray },
            { "lightsteelblue", LightSteelBlue },
            { "lightyellow", LightYellow },
            { "lime", Lime },
            { "limegreen", LimeGreen },
            { "linen", Linen },
            { "magenta", Magenta },
            { "maroon", Maroon },
            { "mediumaquamarine", MediumAquamarine },
            { "mediumblue", MediumBlue },
            { "mediumorchid", MediumOrchid },
            { "mediumpurple", MediumPurple },
            { "mediumseagreen", MediumSeaGreen },
            { "mediumslateblue", MediumSlateBlue },
            { "mediumspringgreen", MediumSpringGreen },
            { "mediumturquoise", MediumTurquoise },
            { "mediumvioletred", MediumVioletRed },
            { "midnightblue", MidnightBlue },
            { "mintcream", MintCream },
            { "mistyrose", MistyRose },
            { "moccasin", Moccasin },
            { "navajowhite", NavajoWhite },
            { "navy", Navy },
            { "oldlace", OldLace },
            { "olive", Olive },
            { "olivedrab", OliveDrab },
            { "orange", Orange },
            { "orangered", OrangeRed },
            { "orchid", Orchid },
            { "palegoldenrod", PaleGoldenrod },
            { "palegreen", PaleGreen },
            { "paleturquoise", PaleTurquoise },
            { "palevioletred", PaleVioletRed },
            { "papayawhip", PapayaWhip },
            { "peachpuff", PeachPuff },
            { "peru", Peru },
            { "pink", Pink },
            { "plum", Plum },
            { "powderblue", PowderBlue },
            { "purple", Purple },
            { "red", Red },
            { "rosybrown", RosyBrown },
            { "royalblue", RoyalBlue },
            { "saddlebrown", SaddleBrown },
            { "salmon", Salmon },
            { "sandybrown", SandyBrown },
            { "seagreen", SeaGreen },
            { "seashell", SeaShell },
            { "sienna", Sienna },
            { "silver", Silver },
            { "skyblue", SkyBlue },
            { "slateblue", SlateBlue },
            { "slategray", SlateGray },
            { "snow", Snow },
            { "springgreen", SpringGreen },
            { "steelblue", SteelBlue },
            { "tan", Tan },
            { "teal", Teal },
            { "thistle", Thistle },
            { "tomato", Tomato },
            { "transparent", Transparent },
            { "turquoise", Turquoise },
            { "violet", Violet },
            { "wheat", Wheat },
            { "white", White },
            { "whitesmoke", WhiteSmoke },
            { "yellow", Yellow },
            { "yellowgreen", YellowGreen }
        };    
    
    
    /** The sorted set nameColorSet that collects the mixed case color names. */
    private static SortedSet nameColorSet = new QuickTreeSet(nameArray);
    
    
    /** The sorted set lowerCaseNameColorSet that collects the lower case color names. */
    private static SortedSet lowerCaseNameColorSet = new QuickTreeSet(lowerCaseNameArray);
    
    
    /** The sorted map nameColorMap that maps the lower case color names to colors. */
    private static SortedMap nameColorMap = new QuickTreeMap(nameColorArray);
    
    
    /**
     * <p>Returns the <CODE>Color</CODE> corresponding to the given name or
     * <CODE>null</CODE> if the name is not in the internal name-color map.</p>
     *
     * <p>The name parameter is converted to lower case prior to the search for
     * an associated color.  Hence the search is not case sensitive.</p>
     *
     * @param  name the name of the Color
     * @return the Color associated with the name
     */
    public static Color getColorFromName(String name) {
        if (name == null)
            return null;
        
        return (Color) nameColorMap.get(name.toLowerCase());
    }
    
    
    /**
     * <P>Returns as a sorted <CODE>String</CODE> array the mixed case
     * color names in the internal name-color map.</P>
     *
     * @return the sorted mixed case color names
     */
    public static String[] getColorNamesAsArray() {
        return (String[]) nameColorSet.toArray(new String[0]);
    }
    
    
    /**
     * <P>Returns as a sorted <CODE>String</CODE> array the lower case
     * color names in the internal name-color map.</P>
     *
     * @return the sorted lower case color names
     */
    public static String[] getLowerCaseColorNamesAsArray() {
        return (String[]) nameColorMap.keySet().toArray(new String[0]);
    }
    
    
    /**
     * <p>Adds a name-color pair to the internal name-color map using
     * the given name and Color.</p>
     *
     * <p>Does nothing if either parameter is <code>null</code>.</p>
     * 
     * <p>The first step in processing is to trim leading and trailing
     * white space from the given name.  Then, if name has zero length,
     * does nothing.  Next, if the first character of name is not a
     * letter, then also does nothing.  Finally, if the name agrees
     * with one of the predefined names when compared independently of
     * case, then also does nothing.  In particular, this means that
     * there is no way to change the predefined name-color pairings
     * but that prior name-color pairings added via this method may be
     * changed.</p>
     *
     * @param name  the string name to identify the color
     * @param color the color to pair with the name
     */
    public static void addNameColorPair(String name, Color color) {
        if ((name == null) || (color == null))
            return;
        
        name = name.trim();
        
        if (name.length() == 0)
            return;
        
        char first = name.charAt(0);
        
        if (! Character.isLetter(first))
            return;
        
        String lowercasename = name.toLowerCase();
        
        if (lowerCaseNameColorSet.contains(lowercasename))
            return;
        
        nameColorSet.add(name);
        nameColorMap.put(lowercasename, color);
    }
    
    
    /**
     * <p>Returns a new color whose r, g, b components are taken from the given
     * color and whose alpha is the given alpha.</p>
     *
     * <p>Returns <code>null</code> if the given color is <code>null</code></p>.
     *
     * <p>The given alpha is forced into the range 0 to 255.</p>
     */
    public static Color makeColorWithAlpha(Color color, int alpha) {
        if (color == null)
            return null;
        
        int r = color.getRed();
        int g = color.getGreen();
        int b = color.getBlue();
        
        if (alpha < 0)
            alpha = 0;
        else
        if (alpha > 255)
            alpha = 255;
        
        return new Color(r, g, b, alpha);
    }
}
