001package com.hfg.graphics; 002 003import java.awt.Color; 004import java.util.ArrayList; 005import java.util.Collections; 006import java.util.List; 007 008import com.hfg.html.attribute.HTMLColor; 009 010//------------------------------------------------------------------------------ 011/** 012 A basic palette of 25 simple and distinct colors. 013 <div> 014 @author J. Alex Taylor, hairyfatguy.com 015 </div> 016 */ 017//------------------------------------------------------------------------------ 018// com.hfg XML/HTML Coding Library 019// 020// This library is free software; you can redistribute it and/or 021// modify it under the terms of the GNU Lesser General Public 022// License as published by the Free Software Foundation; either 023// version 2.1 of the License, or (at your option) any later version. 024// 025// This library is distributed in the hope that it will be useful, 026// but WITHOUT ANY WARRANTY; without even the implied warranty of 027// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 028// Lesser General Public License for more details. 029// 030// You should have received a copy of the GNU Lesser General Public 031// License along with this library; if not, write to the Free Software 032// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 033// 034// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com 035// jataylor@hairyfatguy.com 036//------------------------------------------------------------------------------ 037 038public class SimpleColorPalette extends ColorPaletteImpl 039{ 040 private static List<HTMLColor> sColors; 041 042 /** <span style='width:100px; height:1em; display:inline-block; background-color:AQUA' > </span> */ 043 public static final HTMLColor AQUA = HTMLColor.AQUA; 044 /** <span style='width:100px; height:1em; display:inline-block; background-color:CHARTREUSE' > </span> */ 045 public static final HTMLColor CHARTREUSE = HTMLColor.CHARTREUSE; 046 /** <span style='width:100px; height:1em; display:inline-block; background-color:CHOCOLATE' > </span> */ 047 public static final HTMLColor CHOCOLATE = HTMLColor.CHOCOLATE; 048 /** <span style='width:100px; height:1em; display:inline-block; background-color:CORNFLOWER_BLUE' > </span> */ 049 public static final HTMLColor CORNFLOWER_BLUE = HTMLColor.CORNFLOWER_BLUE; 050 /** <span style='width:100px; height:1em; display:inline-block; background-color:GOLD' > </span> */ 051 public static final HTMLColor GOLD = HTMLColor.GOLD; 052 /** <span style='width:100px; height:1em; display:inline-block; background-color:GREY' > </span> */ 053 public static final HTMLColor GREY = HTMLColor.GREY; 054 /** <span style='width:100px; height:1em; display:inline-block; background-color:ORANGE_RED' > </span> */ 055 public static final HTMLColor ORANGE_RED = HTMLColor.ORANGE_RED; 056 /** <span style='width:100px; height:1em; display:inline-block; background-color:FOREST_GREEN' > </span> */ 057 public static final HTMLColor FOREST_GREEN = HTMLColor.FOREST_GREEN; 058 /** <span style='width:100px; height:1em; display:inline-block; background-color:DARK_SALMON' > </span> */ 059 public static final HTMLColor DARK_SALMON = HTMLColor.DARK_SALMON; 060 /** <span style='width:100px; height:1em; display:inline-block; background-color:DODGER_BLUE' > </span> */ 061 public static final HTMLColor DODGER_BLUE = HTMLColor.DODGER_BLUE; 062 /** <span style='width:100px; height:1em; display:inline-block; background-color:FUCHSIA' > </span> */ 063 public static final HTMLColor FUCHSIA = HTMLColor.FUCHSIA; 064 /** <span style='width:100px; height:1em; display:inline-block; background-color:DARK_SLATE_GRAY' > </span> */ 065 public static final HTMLColor DARK_SLATE_GRAY = HTMLColor.DARK_SLATE_GRAY; 066 /** <span style='width:100px; height:1em; display:inline-block; background-color:DARK_ORANGE' > </span> */ 067 public static final HTMLColor DARK_ORANGE = HTMLColor.DARK_ORANGE; 068 /** <span style='width:100px; height:1em; display:inline-block; background-color:LIGHT_GRAY' > </span> */ 069 public static final HTMLColor LIGHT_GRAY = HTMLColor.LIGHT_GRAY; 070 /** <span style='width:100px; height:1em; display:inline-block; background-color:DARK_CYAN' > </span> */ 071 public static final HTMLColor DARK_CYAN = HTMLColor.DARK_CYAN; 072 /** <span style='width:100px; height:1em; display:inline-block; background-color:YELLOW' > </span> */ 073 public static final HTMLColor YELLOW = HTMLColor.YELLOW; 074 /** <span style='width:100px; height:1em; display:inline-block; background-color:YELLOW_GREEN' > </span> */ 075 public static final HTMLColor YELLOW_GREEN = HTMLColor.YELLOW_GREEN; 076 /** <span style='width:100px; height:1em; display:inline-block; background-color:CORNFLOWER_BLUE' > </span> */ 077 public static final HTMLColor SPRING_GREEN = HTMLColor.SPRING_GREEN; 078 /** <span style='width:100px; height:1em; display:inline-block; background-color:SADDLE_BROWN' > </span> */ 079 public static final HTMLColor SADDLE_BROWN = HTMLColor.SADDLE_BROWN; 080 /** <span style='width:100px; height:1em; display:inline-block; background-color:RED' > </span> */ 081 public static final HTMLColor RED = HTMLColor.RED; 082 /** <span style='width:100px; height:1em; display:inline-block; background-color:OLIVE_DRAB' > </span> */ 083 public static final HTMLColor OLIVE_DRAB = HTMLColor.OLIVE_DRAB; 084 /** <span style='width:100px; height:1em; display:inline-block; background-color:HOT_PINK' > </span> */ 085 public static final HTMLColor HOT_PINK = HTMLColor.HOT_PINK; 086 /** <span style='width:100px; height:1em; display:inline-block; background-color:SLATE_BLUE' > </span> */ 087 public static final HTMLColor SLATE_BLUE = HTMLColor.SLATE_BLUE; 088 /** <span style='width:100px; height:1em; display:inline-block; background-color:NAVY' > </span> */ 089 public static final HTMLColor NAVY = HTMLColor.NAVY; 090 /** <span style='width:100px; height:1em; display:inline-block; background-color:LIGHT_CORAL' > </span> */ 091 public static final HTMLColor LIGHT_CORAL = HTMLColor.LIGHT_CORAL; 092 093 static 094 { 095 sColors = new ArrayList<>(30); 096 097 sColors.add(HTMLColor.AQUA); 098 sColors.add(HTMLColor.CHARTREUSE); 099 sColors.add(HTMLColor.CHOCOLATE); 100 sColors.add(HTMLColor.CORNFLOWER_BLUE); 101 sColors.add(HTMLColor.GOLD); 102 sColors.add(HTMLColor.GREY); 103 sColors.add(HTMLColor.ORANGE_RED); 104 sColors.add(HTMLColor.FOREST_GREEN); 105 sColors.add(HTMLColor.DARK_SALMON); 106 sColors.add(HTMLColor.DODGER_BLUE); 107 sColors.add(HTMLColor.FUCHSIA); 108 sColors.add(HTMLColor.DARK_SLATE_GRAY); 109 sColors.add(HTMLColor.DARK_ORANGE); 110 sColors.add(HTMLColor.LIGHT_GRAY); 111 sColors.add(HTMLColor.DARK_CYAN); 112 sColors.add(HTMLColor.YELLOW); 113 sColors.add(HTMLColor.YELLOW_GREEN); 114 sColors.add(HTMLColor.SPRING_GREEN); 115 sColors.add(HTMLColor.SADDLE_BROWN); 116 sColors.add(HTMLColor.RED); 117 sColors.add(HTMLColor.OLIVE_DRAB); 118 sColors.add(HTMLColor.HOT_PINK); 119 sColors.add(HTMLColor.SLATE_BLUE); 120 sColors.add(HTMLColor.NAVY); 121 sColors.add(HTMLColor.LIGHT_CORAL); 122 123 sColors = Collections.unmodifiableList(sColors); 124 } 125 126 127 //########################################################################## 128 // CONSTRUCTORS 129 //########################################################################## 130 131 //--------------------------------------------------------------------------- 132 public SimpleColorPalette() 133 { 134 super(sColors); 135 } 136 137}