|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the adminbsb-material-design-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2017 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Bundle\AdminBSBBundle\Provider\Color; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Default color provider. |
|
16
|
|
|
* |
|
17
|
|
|
* @author webeweb <https://github.com/webeweb/> |
|
18
|
|
|
* @package WBW\Bundle\AdminBSBBundle\Provider\Color |
|
19
|
|
|
*/ |
|
20
|
|
|
class DefaultColorProvider implements ColorProviderInterface { |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Constructor. |
|
24
|
|
|
*/ |
|
25
|
|
|
public function __construct() { |
|
26
|
|
|
// NOTHING TO DO. |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* {@inheritdoc} |
|
31
|
|
|
*/ |
|
32
|
|
|
public function getColorAmber() { |
|
33
|
|
|
return ["amber" => ["500" => "#FFC107"]]; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* {@inheritdoc} |
|
38
|
|
|
*/ |
|
39
|
|
|
public function getColorBlack() { |
|
40
|
|
|
return ["black" => ["500" => "#000000"]]; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* {@inheritdoc} |
|
45
|
|
|
*/ |
|
46
|
|
|
public function getColorBlue() { |
|
47
|
|
|
return ["blue" => ["500" => "#2196F3"]]; |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* {@inheritdoc} |
|
52
|
|
|
*/ |
|
53
|
|
|
public function getColorBlueGrey() { |
|
54
|
|
|
return ["blue-grey" => ["500" => "#607D8B"]]; |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* {@inheritdoc} |
|
59
|
|
|
*/ |
|
60
|
|
|
public function getColorBrown() { |
|
61
|
|
|
return ["brown" => ["500" => "#795548"]]; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* {@inheritdoc} |
|
66
|
|
|
*/ |
|
67
|
|
|
public function getColorCyan() { |
|
68
|
|
|
return ["cyan" => ["500" => "#00BCD4"]]; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* {@inheritdoc} |
|
73
|
|
|
*/ |
|
74
|
|
|
public function getColorDeepOrange() { |
|
75
|
|
|
return ["deep-orange" => ["500" => "#FF5722"]]; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* {@inheritdoc} |
|
80
|
|
|
*/ |
|
81
|
|
|
public function getColorDeepPurple() { |
|
82
|
|
|
return ["deep-purple" => ["500" => "#673AB7"]]; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* {@inheritdoc} |
|
87
|
|
|
*/ |
|
88
|
|
|
public function getColorGreen() { |
|
89
|
|
|
return ["green" => ["500" => "#4CAF50"]]; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* {@inheritdoc} |
|
94
|
|
|
*/ |
|
95
|
|
|
public function getColorGrey() { |
|
96
|
|
|
return ["grey" => ["500" => "#9E9E9E"]]; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* {@inheritdoc} |
|
101
|
|
|
*/ |
|
102
|
|
|
public function getColorIndigo() { |
|
103
|
|
|
return ["indigo" => ["500" => "#3F51B5"]]; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* {@inheritdoc} |
|
108
|
|
|
*/ |
|
109
|
|
|
public function getColorLightBlue() { |
|
110
|
|
|
return ["light-blue" => ["500" => "#03A9F4"]]; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* {@inheritdoc} |
|
115
|
|
|
*/ |
|
116
|
|
|
public function getColorLightGreen() { |
|
117
|
|
|
return ["light-green" => ["500" => "#8BC34A"]]; |
|
118
|
|
|
} |
|
119
|
|
|
|
|
120
|
|
|
/** |
|
121
|
|
|
* {@inheritdoc} |
|
122
|
|
|
*/ |
|
123
|
|
|
public function getColorLime() { |
|
124
|
|
|
return ["lime" => ["500" => "#CDDC39"]]; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* {@inheritdoc} |
|
129
|
|
|
*/ |
|
130
|
|
|
public function getColorOrange() { |
|
131
|
|
|
return ["orange" => ["500" => "#FF9800"]]; |
|
132
|
|
|
} |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* {@inheritdoc} |
|
136
|
|
|
*/ |
|
137
|
|
|
public function getColorPink() { |
|
138
|
|
|
return ["pink" => ["500" => "#E91E63"]]; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
/** |
|
142
|
|
|
* {@inheritdoc} |
|
143
|
|
|
*/ |
|
144
|
|
|
public function getColorPurple() { |
|
145
|
|
|
return ["purple" => ["500" => "#9C27B0"]]; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* {@inheritdoc} |
|
150
|
|
|
*/ |
|
151
|
|
|
public function getColorRed() { |
|
152
|
|
|
return ["red" => ["500" => "#F44336"]]; |
|
153
|
|
|
} |
|
154
|
|
|
|
|
155
|
|
|
/** |
|
156
|
|
|
* {@inheritdoc} |
|
157
|
|
|
*/ |
|
158
|
|
|
public function getColorTeal() { |
|
159
|
|
|
return ["teal" => ["500" => "#009688"]]; |
|
160
|
|
|
} |
|
161
|
|
|
|
|
162
|
|
|
/** |
|
163
|
|
|
* {@inheritdoc} |
|
164
|
|
|
*/ |
|
165
|
|
|
public function getColorYellow() { |
|
166
|
|
|
return ["yellow" => ["500" => "#FFEB3B"]]; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
/** |
|
170
|
|
|
* {@inheritdoc} |
|
171
|
|
|
*/ |
|
172
|
|
|
public function getColorWhite() { |
|
173
|
|
|
return ["white" => ["500" => "#FFFFFF"]]; |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
/** |
|
177
|
|
|
* Color choices. |
|
178
|
|
|
* |
|
179
|
|
|
* @return array Returns the color choices. |
|
180
|
|
|
*/ |
|
181
|
|
|
public static function getColors() { |
|
182
|
|
|
$provider = new DefaultColorProvider(); |
|
183
|
|
|
return array_merge( |
|
184
|
|
|
$provider->getColorRed(), $provider->getColorPink(), $provider->getColorPurple(), $provider->getColorDeepPurple(), $provider->getColorIndigo(), $provider->getColorBlue(), $provider->getColorLightBlue(), $provider->getColorCyan(), $provider->getColorTeal(), $provider->getColorGreen(), $provider->getColorLightGreen(), $provider->getColorLime(), $provider->getColorYellow(), $provider->getColorAmber(), $provider->getColorOrange(), $provider->getColorDeepOrange(), $provider->getColorBrown(), $provider->getColorGrey(), $provider->getColorBlueGrey(), $provider->getColorBlack(), $provider->getColorWhite() |
|
185
|
|
|
); |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
} |
|
189
|
|
|
|