001package com.hfg.graphics;
002
003
004
005import com.hfg.html.attribute.HTMLColor;
006
007import java.awt.Color;
008import java.util.ArrayList;
009import java.util.Collections;
010import java.util.List;
011
012
013//------------------------------------------------------------------------------
014/**
015 * A set of 26 high contrast colors.
016 * From Green-armytage, Paul. 2010. "A Colour Alphabet and the Limits of Colour Coding." Colour: Design & Creativity 5 (10): 1-23.
017 *
018 * @author J. Alex Taylor, hairyfatguy.com
019 */
020//------------------------------------------------------------------------------
021// com.hfg XML/HTML Coding Library
022//
023// This library is free software; you can redistribute it and/or
024// modify it under the terms of the GNU Lesser General Public
025// License as published by the Free Software Foundation; either
026// version 2.1 of the License, or (at your option) any later version.
027//
028// This library is distributed in the hope that it will be useful,
029// but WITHOUT ANY WARRANTY; without even the implied warranty of
030// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
031// Lesser General Public License for more details.
032//
033// You should have received a copy of the GNU Lesser General Public
034// License along with this library; if not, write to the Free Software
035// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
036//
037// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
038// jataylor@hairyfatguy.com
039//------------------------------------------------------------------------------
040
041public class ContrastingColorPalette extends ColorPaletteImpl
042{
043   private static List<HTMLColor> sColors;
044
045   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(240, 163, 255)' >&nbsp;</span> <span style='font-family:monospace'>(240, 163, 255)</span> */
046   public static final HTMLColor AMETHYST              = new HTMLColor(240, 163, 255);
047   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(148, 255, 181)' >&nbsp;</span> <span style='font-family:monospace'>(148, 255, 181)</span> */
048   public static final HTMLColor JADE                  = new HTMLColor(148, 255, 181);                 
049   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb( 94, 241, 242)' >&nbsp;</span> <span style='font-family:monospace'>( 94, 241, 242)</span> */
050   public static final HTMLColor SKY                   = new HTMLColor( 94, 241, 242);                   
051   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255,   0,  16)' >&nbsp;</span> <span style='font-family:monospace'>(255,   0,  16)</span> */
052   public static final HTMLColor RED                   = new HTMLColor(255,   0,  16);                   
053   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(  0, 117, 220)' >&nbsp;</span> <span style='font-family:monospace'>(  0, 117, 220)</span> */
054   public static final HTMLColor BLUE                  = new HTMLColor(  0, 117, 220);                   
055   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255, 204, 153)' >&nbsp;</span> <span style='font-family:monospace'>(255, 204, 153)</span> */
056   public static final HTMLColor HONEYDEW              = new HTMLColor(255, 204, 153);                  
057   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(143, 124,   0)' >&nbsp;</span> <span style='font-family:monospace'>(143, 124,   0)</span> */
058   public static final HTMLColor KHAKI                 = new HTMLColor(143, 124,   0);                 
059   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(  0, 153, 143)' >&nbsp;</span> <span style='font-family:monospace'>(  0, 153, 143)</span> */
060   public static final HTMLColor TURQUOISE             = new HTMLColor(  0, 153, 143);                  
061   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(153,  63,   0)' >&nbsp;</span> <span style='font-family:monospace'>(153,  63,   0)</span> */
062   public static final HTMLColor CARAMEL               = new HTMLColor(153,  63,   0);                
063   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(157, 204,   0)' >&nbsp;</span> <span style='font-family:monospace'>(157, 204,   0)</span> */
064   public static final HTMLColor LIME                  = new HTMLColor(157, 204,   0);                  
065   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(224, 255, 102)' >&nbsp;</span> <span style='font-family:monospace'>(224, 255, 102)</span> */
066   public static final HTMLColor URANIUM               = new HTMLColor(224, 255, 102);                 
067   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb( 76,   0,  92)' >&nbsp;</span> <span style='font-family:monospace'>( 76,   0,  92)</span> */
068   public static final HTMLColor DAMSOM                = new HTMLColor( 76,   0,  92);                  
069   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(194,   0, 136)' >&nbsp;</span> <span style='font-family:monospace'>(194,   0, 136)</span> */
070   public static final HTMLColor MALLOW                = new HTMLColor(194,   0, 136);                  
071   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(116,  10, 255)' >&nbsp;</span> <span style='font-family:monospace'>(116,  10, 255)</span> */
072   public static final HTMLColor VIOLET                = new HTMLColor(116,  10, 255);                   
073   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb( 25,  25,  25)' >&nbsp;</span> <span style='font-family:monospace'>( 25,  25,  25)</span> */
074   public static final HTMLColor EBONY                 = new HTMLColor( 25,  25,  25);                  
075   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(  0,  51, 128)' >&nbsp;</span> <span style='font-family:monospace'>(  0,  51, 128)</span> */
076   public static final HTMLColor NAVY                  = new HTMLColor(  0,  51, 128);                   
077   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(153,   0,   0)' >&nbsp;</span> <span style='font-family:monospace'>(153,   0,   0)</span> */
078   public static final HTMLColor WINE                  = new HTMLColor(153,   0,   0);                    
079   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(  0,  92,  49)' >&nbsp;</span> <span style='font-family:monospace'>(  0,  92,  49)</span> */
080   public static final HTMLColor FOREST                = new HTMLColor(  0,  92,  49);                    
081   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255, 164,   5)' >&nbsp;</span> <span style='font-family:monospace'>(255, 164,   5)</span> */
082   public static final HTMLColor ORPIMENT              = new HTMLColor(255, 164,   5);                    
083   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255, 255, 128)' >&nbsp;</span> <span style='font-family:monospace'>(255, 255, 128)</span> */
084   public static final HTMLColor XANTHIN               = new HTMLColor(255, 255, 128);                    
085   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb( 43, 206,  72)' >&nbsp;</span> <span style='font-family:monospace'>( 43, 206,  72)</span> */
086   public static final HTMLColor GREEN                 = new HTMLColor( 43, 206,  72);                    
087   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255, 168, 187)' >&nbsp;</span> <span style='font-family:monospace'>(255, 168, 187)</span> */
088   public static final HTMLColor PINK                  = new HTMLColor(255, 168, 187);                    
089   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255, 255,   0)' >&nbsp;</span> <span style='font-family:monospace'>(255, 255,   0)</span> */
090   public static final HTMLColor YELLOW                = new HTMLColor(255, 255,   0);
091   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb( 66, 102,   0)' >&nbsp;</span> <span style='font-family:monospace'>( 66, 102,   0)</span> */
092   public static final HTMLColor QUAGMIRE              = new HTMLColor( 66, 102,   0);
093   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(255,  80,   5)' >&nbsp;</span> <span style='font-family:monospace'>(255,  80,   5)</span> */
094   public static final HTMLColor ZINNIA                = new HTMLColor(255,  80,   5);
095   /** <span style='width:100px; height:1em; display:inline-block; background-color:rgb(128, 128, 128)' >&nbsp;</span> <span style='font-family:monospace'>(128, 128, 128)</span> */
096   public static final HTMLColor IRON                  = new HTMLColor(128, 128, 128);
097
098   static
099   {
100      sColors = new ArrayList<>(30);
101
102      sColors.add(AMETHYST);
103      sColors.add(JADE);
104      sColors.add(SKY);
105      sColors.add(RED);
106      sColors.add(BLUE);
107      sColors.add(HONEYDEW);
108      sColors.add(KHAKI);
109      sColors.add(TURQUOISE);
110      sColors.add(CARAMEL);
111      sColors.add(LIME);
112      sColors.add(URANIUM);
113      sColors.add(DAMSOM);
114      sColors.add(MALLOW);
115      sColors.add(VIOLET);
116      sColors.add(EBONY);
117      sColors.add(NAVY);
118      sColors.add(WINE);
119      sColors.add(FOREST);
120      sColors.add(ORPIMENT);
121      sColors.add(XANTHIN);
122      sColors.add(GREEN);
123      sColors.add(PINK);
124      sColors.add(YELLOW);
125      sColors.add(QUAGMIRE);
126      sColors.add(ZINNIA);
127      sColors.add(IRON);
128
129      sColors = Collections.unmodifiableList(sColors);
130   }
131
132
133   //##########################################################################
134   // CONSTRUCTORS
135   //##########################################################################
136
137   //---------------------------------------------------------------------------
138   public ContrastingColorPalette()
139   {
140      super(sColors);
141   }
142
143}