-
Notifications
You must be signed in to change notification settings - Fork 1
/
colorpalettes.py
176 lines (147 loc) · 3.83 KB
/
colorpalettes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
from .colorutils import *
# Preset color schemes, such as they are.
# These schemes are all declared as "PROGMEM", meaning
# that they won't take up SRAM on AVR chips until used.
# Furthermore, the compiler won't even include these
# in your PROGMEM (flash) storage unless you specifically
# use each one, so you only 'pay for' those you actually use.
CloudColors_p = TProgmemRGBPalette16(
[
Blue,
DarkBlue,
DarkBlue,
DarkBlue,
DarkBlue,
DarkBlue,
DarkBlue,
DarkBlue,
Blue,
DarkBlue,
SkyBlue,
SkyBlue,
LightBlue,
White,
LightBlue,
SkyBlue
]
)
LavaColors_p = TProgmemRGBPalette16(
[
Black,
Maroon,
Black,
Maroon,
DarkRed,
Maroon,
DarkRed,
DarkRed,
DarkRed,
Red,
Orange,
White,
Orange,
Red,
DarkRed
]
)
OceanColors_p = TProgmemRGBPalette16(
[
MidnightBlue,
DarkBlue,
MidnightBlue,
Navy,
DarkBlue,
MediumBlue,
SeaGreen,
Teal,
CadetBlue,
Blue,
DarkCyan,
CornflowerBlue,
Aquamarine,
SeaGreen,
Aqua,
LightSkyBlue
]
)
ForestColors_p = TProgmemRGBPalette16(
[
DarkGreen,
DarkGreen,
DarkOliveGreen,
DarkGreen,
Green,
ForestGreen,
OliveDrab,
Green,
SeaGreen,
MediumAquamarine,
LimeGreen,
YellowGreen,
LightGreen,
LawnGreen,
MediumAquamarine,
ForestGreen
]
)
# HSV Rainbow
RainbowColors_p = TProgmemRGBPalette16(
[
0xFF0000, 0xD52A00, 0xAB5500, 0xAB7F00,
0xABAB00, 0x56D500, 0x00FF00, 0x00D52A,
0x00AB55, 0x0056AA, 0x0000FF, 0x2A00D5,
0x5500AB, 0x7F0081, 0xAB0055, 0xD5002B
]
)
# HSV Rainbow colors with alternatating stripes of black
RainbowStripeColors_p = TProgmemRGBPalette16(
[
0xFF0000, 0x000000, 0xAB5500, 0x000000,
0xABAB00, 0x000000, 0x00FF00, 0x000000,
0x00AB55, 0x000000, 0x0000FF, 0x000000,
0x5500AB, 0x000000, 0xAB0055, 0x000000
]
)
RainbowStripesColors_p = RainbowStripeColors_p
# HSV color ramp: blue purple ping red orange yellow (and back)
# Basically, everything but the greens, which tend to make
# people's skin look unhealthy. This palette is good for
# lighting at a club or party, where it'll be shining on people.
PartyColors_p = TProgmemRGBPalette16(
[
0x5500AB, 0x84007C, 0xB5004B, 0xE5001B,
0xE81700, 0xB84700, 0xAB7700, 0xABAB00,
0xAB5500, 0xDD2200, 0xF2000E, 0xC2003E,
0x8F0071, 0x5F00A1, 0x2F00D0, 0x0007F9
]
)
# Approximate "black body radiation" palette, akin to
# the FastLED 'HeatColor' function.
# Recommend that you use values 0-240 rather than
# the usual 0-255, as the last 15 colors will be
# 'wrapping around' from the hot end to the cold end,
# which looks wrong.
HeatColors_p = TProgmemRGBPalette16(
[
0x000000,
0x330000, 0x660000, 0x990000, 0xCC0000, 0xFF0000,
0xFF3300, 0xFF6600, 0xFF9900, 0xFFCC00, 0xFFFF00,
0xFFFF33, 0xFFFF66, 0xFFFF99, 0xFFFFCC, 0xFFFFFF
]
)
# Gradient palette "Rainbow_gp",
# provided for situations where you're going
# to use a number of other gradient palettes, AND
# you want a 'standard' FastLED rainbow as well.
def DEFINE_GRADIENT_PALETTE():
return [
0, 255, 0, 0, # Red
32, 171, 85, 0, # Orange
64, 171, 171, 0, # Yellow
96, 0, 255, 0, # Green
128, 0, 171, 85, # Aqua
160, 0, 0, 255, # Blue
192, 85, 0, 171, # Purple
224, 171, 0, 85, # Pink
255, 255, 0, 0 # and back to Red
]