2 /* Libchart - PHP chart library
3 * Copyright (C) 2005-2008 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * Color palette shared by all chart types.
23 * @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
24 * Created on 25 july 2007
36 * Palette constructor.
38 public function Palette() {
39 $this->red = new Color(255, 0, 0);
41 // Colors for the horizontal and vertical axis
42 $this->axisColor = array(
43 new Color(201, 201, 201),
44 new Color(158, 158, 158)
47 // Colors for the background
48 $this->aquaColor = array(
49 new Color(242, 242, 242),
50 new Color(231, 231, 231),
51 new Color(239, 239, 239),
52 new Color(253, 253, 253)
55 // Colors for the bars
56 $this->barColorSet = new ColorSet(array(
57 new Color(42, 71, 181),
58 new Color(243, 198, 118),
59 new Color(128, 63, 35),
60 new Color(195, 45, 28),
61 new Color(224, 198, 165),
62 new Color(239, 238, 218),
63 new Color(40, 72, 59),
64 new Color(71, 112, 132),
65 new Color(167, 192, 199),
66 new Color(218, 233, 202)
69 // Colors for the lines
70 $this->lineColorSet = new ColorSet(array(
71 new Color(172, 172, 210),
73 new Color(148, 170, 36),
74 new Color(233, 191, 49),
75 new Color(240, 127, 41),
76 new Color(243, 63, 34),
77 new Color(190, 71, 47),
78 new Color(135, 81, 60),
79 new Color(128, 78, 162),
80 new Color(121, 75, 255),
81 new Color(142, 165, 250),
82 new Color(162, 254, 239),
83 new Color(137, 240, 166),
84 new Color(104, 221, 71),
85 new Color(98, 174, 35),
90 $this->pieColorSet = new ColorSet(array(
92 new Color(148, 170, 36),
93 new Color(233, 191, 49),
94 new Color(240, 127, 41),
95 new Color(243, 63, 34),
96 new Color(190, 71, 47),
97 new Color(135, 81, 60),
98 new Color(128, 78, 162),
99 new Color(121, 75, 255),
100 new Color(142, 165, 250),
101 new Color(162, 254, 239),
102 new Color(137, 240, 166),
103 new Color(104, 221, 71),
104 new Color(98, 174, 35),
105 new Color(93, 129, 1)