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5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
  2 // See the file tools.license for terms.
  3 
  4 #ifndef tools_colors
  5 #define tools_colors
  6 
  7 // our forever 65 named colors taken long time ago from X11.
  8 
  9 namespace tools {
 10 
 11 #define TOOLS_COLORS_SET(a__name,a__r,a__g,a__b) \
 12   template <class COLOR>\
 13   inline void set_color_##a__name(COLOR& a_color) {a_color.set_value(a__r,a__g,a__b,1);}
 14 
 15 //0-9
 16 TOOLS_COLORS_SET(aquamarine,0.496101F,0.996109F,0.828138F)
 17 TOOLS_COLORS_SET(mediumaquamarine,0.398444F,0.800793F,0.664073F)
 18 TOOLS_COLORS_SET(black,0,0,0)
 19 TOOLS_COLORS_SET(blue,0,0,1)
 20 TOOLS_COLORS_SET(cadetblue,0.371099F,0.617197F,0.62501F)
 21 TOOLS_COLORS_SET(cornflowerblue,0.390631F,0.58204F,0.925795F)
 22 TOOLS_COLORS_SET(darkslateblue,0.281254F,0.238285F,0.542977F)
 23 TOOLS_COLORS_SET(lightblue,0.675792F,0.843763F,0.898451F)
 24 TOOLS_COLORS_SET(lightsteelblue,0.68751F,0.765637F,0.867201F)
 25 TOOLS_COLORS_SET(mediumblue,0,0,0.800793F)
 26 
 27 //10-19
 28 TOOLS_COLORS_SET(mediumslateblue,0.480476F,0.406256F,0.929702F)
 29 TOOLS_COLORS_SET(midnightblue,0.0976577F,0.0976577F,0.437507F)
 30 TOOLS_COLORS_SET(navyblue,0,0,0.500008F)
 31 TOOLS_COLORS_SET(navy,0,0,0.500008F)
 32 TOOLS_COLORS_SET(skyblue,0.527352F,0.8047F,0.917983F)
 33 TOOLS_COLORS_SET(slateblue,0.414069F,0.351568F,0.800793F)
 34 TOOLS_COLORS_SET(steelblue,0.273442F,0.50782F,0.703136F)
 35 TOOLS_COLORS_SET(coral,0.996109F,0.496101F,0.312505F)
 36 TOOLS_COLORS_SET(cyan,0,1,1)
 37 TOOLS_COLORS_SET(firebrick,0.695323F,0.132815F,0.132815F)
 38 
 39 //20-29
 40 TOOLS_COLORS_SET(brown,0.644541F,0.164065F,0.164065F)
 41 TOOLS_COLORS_SET(gold,0.996109F,0.839857F,0)
 42 TOOLS_COLORS_SET(goldenrod,0.851575F,0.644541F,0.125002F)
 43 TOOLS_COLORS_SET(green,0,1,0)
 44 TOOLS_COLORS_SET(darkgreen,0,0.390631F,0)
 45 TOOLS_COLORS_SET(darkolivegreen,0.332036F,0.417975F,0.183597F)
 46 TOOLS_COLORS_SET(forestgreen,0.132815F,0.542977F,0.132815F)
 47 TOOLS_COLORS_SET(limegreen,0.195315F,0.800793F,0.195315F)
 48 TOOLS_COLORS_SET(mediumseagreen,0.234379F,0.699229F,0.441413F)
 49 TOOLS_COLORS_SET(mediumspringgreen,0,0.976577F,0.601572F)
 50 
 51 //30-39
 52 TOOLS_COLORS_SET(palegreen,0.593759F,0.980484F,0.593759F)
 53 TOOLS_COLORS_SET(seagreen,0.17969F,0.542977F,0.339849F)
 54 TOOLS_COLORS_SET(springgreen,0,0.996109F,0.496101F)
 55 TOOLS_COLORS_SET(yellowgreen,0.601572F,0.800793F,0.195315F)
 56 TOOLS_COLORS_SET(darkslategrey,0.183597F,0.308598F,0.308598F)
 57 TOOLS_COLORS_SET(dimgrey,0.410163F,0.410163F,0.410163F)
 58 TOOLS_COLORS_SET(lightgrey,0.824231F,0.824231F,0.824231F)
 59 TOOLS_COLORS_SET(grey,0.750011F,0.750011F,0.750011F)
 60 TOOLS_COLORS_SET(khaki,0.937514F,0.898451F,0.546883F)
 61 TOOLS_COLORS_SET(magenta,1,0,1)
 62 
 63 //40-49
 64 TOOLS_COLORS_SET(maroon,0.68751F,0.187503F,0.375006F)
 65 TOOLS_COLORS_SET(orange,0.996109F,0.644541F,0)
 66 TOOLS_COLORS_SET(orchid,0.851575F,0.437507F,0.83595F)
 67 TOOLS_COLORS_SET(darkorchid,0.597665F,0.195315F,0.796887F)
 68 TOOLS_COLORS_SET(mediumorchid,0.726574F,0.332036F,0.824231F)
 69 TOOLS_COLORS_SET(pink,0.996109F,0.750011F,0.792981F)
 70 TOOLS_COLORS_SET(plum,0.863294F,0.62501F,0.863294F)
 71 TOOLS_COLORS_SET(red,1,0,0)
 72 TOOLS_COLORS_SET(indianred,0.800793F,0.35938F,0.35938F)
 73 TOOLS_COLORS_SET(mediumvioletred,0.777356F,0.0820325F,0.519539F)
 74 
 75 //50-59
 76 TOOLS_COLORS_SET(orangered,0.996109F,0.269535F,0)
 77 TOOLS_COLORS_SET(violetred,0.812512F,0.125002F,0.562509F)
 78 TOOLS_COLORS_SET(salmon,0.976577F,0.500008F,0.445319F)
 79 TOOLS_COLORS_SET(sienna,0.62501F,0.320317F,0.175784F)
 80 TOOLS_COLORS_SET(tan,0.820325F,0.703136F,0.546883F)
 81 TOOLS_COLORS_SET(thistle,0.843763F,0.746105F,0.843763F)
 82 TOOLS_COLORS_SET(turquoise,0.250004F,0.875013F,0.812512F)
 83 TOOLS_COLORS_SET(darkturquoise,0,0.8047F,0.816419F)
 84 TOOLS_COLORS_SET(mediumturquoise,0.281254F,0.816419F,0.796887F)
 85 TOOLS_COLORS_SET(violet,0.929702F,0.50782F,0.929702F)
 86 
 87 //60-64
 88 TOOLS_COLORS_SET(blueviolet,0.539071F,0.167971F,0.882826F)
 89 TOOLS_COLORS_SET(wheat,0.957046F,0.867201F,0.699229F)
 90 TOOLS_COLORS_SET(white,1,1,1)
 91 TOOLS_COLORS_SET(yellow,1,1,0)
 92 TOOLS_COLORS_SET(greenyellow,0.675792F,0.996109F,0.18359F)
 93 
 94 #undef TOOLS_COLORS_SET
 95 
 96 #if defined(TOOLS_MEM) && !defined(TOOLS_MEM_ATEXIT)
 97 #define TOOLS_COLORS_STAT(a__name,a__r,a__g,a__b) \
 98   template <class COLOR>\
 99   inline const COLOR& get_color_##a__name() {static const COLOR s_v(a__r,a__g,a__b,1,false);return s_v;}
100 #else
101 #define TOOLS_COLORS_STAT(a__name,a__r,a__g,a__b) \
102   template <class COLOR>\
103   inline const COLOR& get_color_##a__name() {static const COLOR s_v(a__r,a__g,a__b,1);return s_v;}
104 #endif
105 
106 //0-9
107 TOOLS_COLORS_STAT(aquamarine,0.496101F,0.996109F,0.828138F)
108 TOOLS_COLORS_STAT(mediumaquamarine,0.398444F,0.800793F,0.664073F)
109 TOOLS_COLORS_STAT(black,0,0,0)
110 TOOLS_COLORS_STAT(blue,0,0,1)
111 TOOLS_COLORS_STAT(cadetblue,0.371099F,0.617197F,0.62501F)
112 TOOLS_COLORS_STAT(cornflowerblue,0.390631F,0.58204F,0.925795F)
113 TOOLS_COLORS_STAT(darkslateblue,0.281254F,0.238285F,0.542977F)
114 TOOLS_COLORS_STAT(lightblue,0.675792F,0.843763F,0.898451F)
115 TOOLS_COLORS_STAT(lightsteelblue,0.68751F,0.765637F,0.867201F)
116 TOOLS_COLORS_STAT(mediumblue,0,0,0.800793F)
117 
118 //10-19
119 TOOLS_COLORS_STAT(mediumslateblue,0.480476F,0.406256F,0.929702F)
120 TOOLS_COLORS_STAT(midnightblue,0.0976577F,0.0976577F,0.437507F)
121 TOOLS_COLORS_STAT(navyblue,0,0,0.500008F)
122 TOOLS_COLORS_STAT(navy,0,0,0.500008F)
123 TOOLS_COLORS_STAT(skyblue,0.527352F,0.8047F,0.917983F)
124 TOOLS_COLORS_STAT(slateblue,0.414069F,0.351568F,0.800793F)
125 TOOLS_COLORS_STAT(steelblue,0.273442F,0.50782F,0.703136F)
126 TOOLS_COLORS_STAT(coral,0.996109F,0.496101F,0.312505F)
127 TOOLS_COLORS_STAT(cyan,0,1,1)
128 TOOLS_COLORS_STAT(firebrick,0.695323F,0.132815F,0.132815F)
129 
130 //20-29
131 TOOLS_COLORS_STAT(brown,0.644541F,0.164065F,0.164065F)
132 TOOLS_COLORS_STAT(gold,0.996109F,0.839857F,0)
133 TOOLS_COLORS_STAT(goldenrod,0.851575F,0.644541F,0.125002F)
134 TOOLS_COLORS_STAT(green,0,1,0)
135 TOOLS_COLORS_STAT(darkgreen,0,0.390631F,0)
136 TOOLS_COLORS_STAT(darkolivegreen,0.332036F,0.417975F,0.183597F)
137 TOOLS_COLORS_STAT(forestgreen,0.132815F,0.542977F,0.132815F)
138 TOOLS_COLORS_STAT(limegreen,0.195315F,0.800793F,0.195315F)
139 TOOLS_COLORS_STAT(mediumseagreen,0.234379F,0.699229F,0.441413F)
140 TOOLS_COLORS_STAT(mediumspringgreen,0,0.976577F,0.601572F)
141 
142 //30-39
143 TOOLS_COLORS_STAT(palegreen,0.593759F,0.980484F,0.593759F)
144 TOOLS_COLORS_STAT(seagreen,0.17969F,0.542977F,0.339849F)
145 TOOLS_COLORS_STAT(springgreen,0,0.996109F,0.496101F)
146 TOOLS_COLORS_STAT(yellowgreen,0.601572F,0.800793F,0.195315F)
147 TOOLS_COLORS_STAT(darkslategrey,0.183597F,0.308598F,0.308598F)
148 TOOLS_COLORS_STAT(dimgrey,0.410163F,0.410163F,0.410163F)
149 TOOLS_COLORS_STAT(lightgrey,0.824231F,0.824231F,0.824231F)
150 TOOLS_COLORS_STAT(grey,0.750011F,0.750011F,0.750011F)
151 TOOLS_COLORS_STAT(khaki,0.937514F,0.898451F,0.546883F)
152 TOOLS_COLORS_STAT(magenta,1,0,1)
153 
154 //40-49
155 TOOLS_COLORS_STAT(maroon,0.68751F,0.187503F,0.375006F)
156 TOOLS_COLORS_STAT(orange,0.996109F,0.644541F,0)
157 TOOLS_COLORS_STAT(orchid,0.851575F,0.437507F,0.83595F)
158 TOOLS_COLORS_STAT(darkorchid,0.597665F,0.195315F,0.796887F)
159 TOOLS_COLORS_STAT(mediumorchid,0.726574F,0.332036F,0.824231F)
160 TOOLS_COLORS_STAT(pink,0.996109F,0.750011F,0.792981F)
161 TOOLS_COLORS_STAT(plum,0.863294F,0.62501F,0.863294F)
162 TOOLS_COLORS_STAT(red,1,0,0)
163 TOOLS_COLORS_STAT(indianred,0.800793F,0.35938F,0.35938F)
164 TOOLS_COLORS_STAT(mediumvioletred,0.777356F,0.0820325F,0.519539F)
165 
166 //50-59
167 TOOLS_COLORS_STAT(orangered,0.996109F,0.269535F,0)
168 TOOLS_COLORS_STAT(violetred,0.812512F,0.125002F,0.562509F)
169 TOOLS_COLORS_STAT(salmon,0.976577F,0.500008F,0.445319F)
170 TOOLS_COLORS_STAT(sienna,0.62501F,0.320317F,0.175784F)
171 TOOLS_COLORS_STAT(tan,0.820325F,0.703136F,0.546883F)
172 TOOLS_COLORS_STAT(thistle,0.843763F,0.746105F,0.843763F)
173 TOOLS_COLORS_STAT(turquoise,0.250004F,0.875013F,0.812512F)
174 TOOLS_COLORS_STAT(darkturquoise,0,0.8047F,0.816419F)
175 TOOLS_COLORS_STAT(mediumturquoise,0.281254F,0.816419F,0.796887F)
176 TOOLS_COLORS_STAT(violet,0.929702F,0.50782F,0.929702F)
177 
178 //60-64
179 TOOLS_COLORS_STAT(blueviolet,0.539071F,0.167971F,0.882826F)
180 TOOLS_COLORS_STAT(wheat,0.957046F,0.867201F,0.699229F)
181 TOOLS_COLORS_STAT(white,1,1,1)
182 TOOLS_COLORS_STAT(yellow,1,1,0)
183 TOOLS_COLORS_STAT(greenyellow,0.675792F,0.996109F,0.18359F)
184 
185 ////////////////////////////////////////////////////////
186 /// CERN-ROOT colors : /////////////////////////////////
187 ////////////////////////////////////////////////////////
188 
189 TOOLS_COLORS_STAT(ROOT_Color8,  0.35F,0.83F,0.33F)
190 TOOLS_COLORS_STAT(ROOT_Color9,  0.35F,0.33F,0.85F)
191 TOOLS_COLORS_STAT(ROOT_grey12,  0.3F,0.3F,0.3F)
192 TOOLS_COLORS_STAT(ROOT_grey13,  0.4F,0.4F,0.4F)
193 TOOLS_COLORS_STAT(ROOT_grey14,  0.5F,0.5F,0.5F)
194 TOOLS_COLORS_STAT(ROOT_grey15,  0.6F,0.6F,0.6F)
195 TOOLS_COLORS_STAT(ROOT_grey16,  0.7F,0.7F,0.7F)
196 TOOLS_COLORS_STAT(ROOT_grey17,  0.8F,0.8F,0.8F)
197 TOOLS_COLORS_STAT(ROOT_grey18,  0.9F,0.9F,0.9F)
198 TOOLS_COLORS_STAT(ROOT_grey19 , 0.95F,0.95F,0.95F)
199 TOOLS_COLORS_STAT(ROOT_Color50, 0.83F,0.35F,0.33F)
200 
201 #undef TOOLS_COLORS_STAT
202 
203 }
204 
205 #endif