add gitignore
[chaz/homebank] / src / gtk-chart-colors.c
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <gtk/gtk.h>
21
22 #include "gtk-chart-colors.h"
23
24 char *chart_colors[] =
25 {
26 "HomeBank",
27 "Money",
28 "SAP",
29 "Quicken",
30 "Office 2010",
31 "Office 2013",
32 "Analytics",
33 NULL
34 };
35
36
37 struct rgbcol money_colors[] =
38 {
39 { 255, 193, 96 },
40 { 92, 131, 180 },
41 { 165, 88, 124 },
42 { 108, 124, 101 },
43 { 230, 121, 99 },
44 { 91, 160, 154 },
45 { 207, 93, 96 },
46 { 70, 136, 106 },
47
48 { 245, 163, 97 },
49 { 158, 153, 88 },
50 { 255, 140, 90 },
51 { 122, 151, 173 },
52 { 84, 142, 128 },
53 { 185, 201, 149 },
54 { 165, 99, 103 },
55 { 77, 140, 172 },
56
57 { 251, 228, 128 },
58 { 73, 99, 149 },
59 { 192, 80, 77 },
60 { 139, 180, 103 },
61 { 132, 165, 214 },
62 { 221, 216, 115 },
63 { 77, 103, 137 },
64 { 165, 181, 156 },
65
66 };
67 int money_nbcolors = G_N_ELEMENTS(money_colors);
68
69
70 struct rgbcol quicken_colors[] =
71 {
72 { 226, 73, 13 },
73 { 223, 180, 6 },
74 { 124, 179, 0 },
75 { 44, 108, 182 },
76 { 184, 81, 186 },
77 { 165, 165, 165 },
78 { 122, 122, 122 },
79 { 137, 42, 40 },
80
81 { 70, 161, 100 },
82 { 220, 106, 0 },
83 { 113, 113, 113 }, // others
84 };
85 int quicken_nbcolors = G_N_ELEMENTS(quicken_colors);
86
87
88 struct rgbcol analytics_colors[] =
89 {
90 { 5, 141, 199 }, //line color
91 { 80, 180, 50 },
92 { 237, 86, 27 },
93 { 237, 239, 0 },
94 { 36, 203, 229 },
95 { 100, 229, 114 },
96 { 255, 150, 85 },
97 { 255, 242, 99 },
98
99 { 106, 249, 196 },
100 { 178, 222, 255 },
101 { 204, 204, 204 }, // others
102 };
103 int analytics_nbcolors = G_N_ELEMENTS(analytics_colors);
104
105
106 struct rgbcol office2010_colors[] =
107 {
108 { 60, 100, 149 },
109 { 150, 60, 59 },
110 { 120, 147, 68 },
111 { 99, 75, 123 },
112 { 61, 133, 157 },
113 { 196, 115, 49 },
114
115 { 73, 120, 176 },
116 { 179, 74, 71 },
117 { 144, 178, 84 },
118 { 117, 93, 153 },
119 { 73, 161, 185 },
120 { 232, 140, 65 },
121
122 { 126, 155, 199 },
123 { 202, 126, 126 },
124 { 174, 197, 129 },
125 { 156, 137, 182 },
126 { 123, 185, 206 },
127 { 248, 170, 121 },
128 };
129 int office2010_nbcolors = G_N_ELEMENTS(office2010_colors);
130
131
132 struct rgbcol office2013_colors[] =
133 {
134 { 91, 155, 213 },
135 { 237, 125, 49 },
136 { 165, 165, 165 },
137 { 255, 192, 0 },
138 { 68, 114, 196 },
139 { 112, 173, 71 },
140
141 { 37, 94, 145 },
142 { 158, 72, 14 },
143 { 99, 99, 99 },
144 { 153, 115, 0 },
145 { 38, 68, 120 },
146 { 67, 104, 43 },
147
148 { 124, 175, 221 },
149 { 241, 151, 90 },
150 { 183, 183, 183 },
151 { 255, 205, 51 },
152 { 105, 142, 208 },
153 { 140, 193, 104 },
154 };
155 int office2013_nbcolors = G_N_ELEMENTS(office2013_colors);
156
157 struct rgbcol sap_colors[] =
158 {
159 { 107, 148, 181 },
160 { 239, 205, 120 },
161 { 160, 117, 146 },
162 { 107, 181, 144 },
163 { 237, 164, 112 },
164 { 107, 106, 161 },
165 { 183, 213, 104 },
166 { 214, 128, 118 },
167
168 { 135, 115, 161 },
169 { 218, 217, 86 },
170 { 207, 111, 122 },
171 { 85, 168, 161 },
172 { 253, 213, 65 },
173 { 146, 98, 148 },
174 { 115, 192, 59 },
175 { 205, 81, 96 },
176
177 { 53, 180, 201 },
178 { 248, 175, 103 },
179 { 186, 97, 125 },
180 { 117, 202, 249 },
181 { 244, 131, 35 },
182 { 178, 45, 110 },
183 { 87, 229, 151 },
184 { 204, 171, 68 },
185
186 { 172, 110, 145 },
187 { 61, 132, 137 },
188 { 224, 117, 79 },
189 { 117, 84, 148 },
190 { 155, 206, 158 },
191 { 255, 133, 100 },
192 { 60, 98, 153 },
193 { 128, 197, 122 },
194 };
195 int sap_nbcolors = G_N_ELEMENTS(sap_colors);
196
197 struct rgbcol homebank_colors[] =
198 {
199 { 72, 118, 176 },
200 { 180, 198, 230 },
201 { 227, 126, 35 },
202 { 238, 186, 123 },
203 { 97, 158, 58 },
204 { 175, 222, 142 },
205 { 184, 43, 44 },
206 { 231, 151, 149 },
207 { 136, 103, 185 },
208 { 190, 174, 210 },
209 { 127, 87, 77 },
210 { 184, 155, 147 },
211 { 202, 118, 190 },
212 { 230, 181, 208 },
213 { 126, 126, 126 },
214 { 198, 198, 198 },
215 { 187, 188, 56 },
216 { 218, 218, 144 },
217 { 109, 189, 205 },
218 { 176, 217, 228 },
219
220 { 237, 212, 0 },
221 { 255, 239, 101 },
222 { 207, 93, 96 },
223 { 234, 186, 187 },
224 { 193, 124, 17 },
225 { 240, 181, 90 },
226 { 186, 189, 182 },
227 { 225, 227, 223 },
228 { 115, 210, 22 },
229 { 175, 240, 112 },
230 { 255, 140, 90 },
231 { 255, 191, 165 },
232
233 };
234 int homebank_nbcolors = G_N_ELEMENTS(homebank_colors);
235
236
237
238 struct rgbcol global_colors[] =
239 {
240 { 0, 0, 0}, // black
241 {255, 255, 255}, // white
242 {239, 239, 239}, // grey1 intermediate lines
243 { 68, 68, 68}, // text
244 { 51, 51, 51}, // x/y axis
245 { 0, 0, 0}, // theme base
246 { 0, 0, 0}, // theme text
247 };
248
249
250
251 /*
252 struct rgbcol global_colors[] =
253 {
254 { 0, 0, 0}, // black
255 {255, 255, 255}, // white
256 {238, 238, 238}, // #top/bottom lines
257 {204, 204, 204}, // #dotted lines
258 {102, 102, 102}, // #x-axis, scale text
259 {153, 153, 153}, // # ??
260 { 0, 119, 204}, // #line color
261
262 //new
263 {239, 239, 239}, // intermediate lines
264 { 68, 68, 68}, // text
265 { 51, 51, 51}, // x/y axis
266
267
268 };*/
269
270
271
272
273 void cairo_user_set_rgbcol(cairo_t *cr, struct rgbcol *col)
274 {
275 cairo_set_source_rgb(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b));
276 }
277
278
279 void cairo_user_set_rgbacol(cairo_t *cr, struct rgbcol *col, double alpha)
280 {
281 cairo_set_source_rgba(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b), alpha);
282 }
283
284
285 void cairo_user_set_rgbcol_over(cairo_t *cr, struct rgbcol *col, gboolean over)
286 {
287 if( over )
288 cairo_set_source_rgb(cr, COLTOCAIROOVER(col->r), COLTOCAIROOVER(col->g), COLTOCAIROOVER(col->b));
289 else
290 cairo_set_source_rgb(cr, COLTOCAIRO(col->r), COLTOCAIRO(col->g), COLTOCAIRO(col->b));
291 }
292
This page took 0.055365 seconds and 4 git commands to generate.