Each color in PixelNote is assigned a number between 0 and 255.

Full color number table

0
64
128
192
16
80
144
208
32
96
160
224
48
112
176
240
1
65
129
193
17
81
145
209
33
97
161
225
49
113
177
241
2
66
130
194
18
82
146
210
34
98
162
226
50
114
178
242
3
67
131
195
19
83
147
211
35
99
163
227
51
115
179
243
4
68
132
196
20
84
148
212
36
100
164
228
52
116
180
244
5
69
133
197
21
85
149
213
37
101
165
229
53
117
181
245
6
70
134
198
22
86
150
214
38
102
166
230
54
118
182
246
7
71
135
199
23
87
151
215
39
103
167
231
55
119
183
247
8
72
136
200
24
88
152
216
40
104
168
232
56
120
184
248
9
73
137
201
25
89
153
217
41
105
169
233
57
121
185
249
10
74
138
202
26
90
154
218
42
106
170
234
58
122
186
250
11
75
139
203
27
91
155
219
43
107
171
235
59
123
187
251
12
76
140
204
28
92
156
220
44
108
172
236
60
124
188
252
13
77
141
205
29
93
157
221
45
109
173
237
61
125
189
253
14
78
142
206
30
94
158
222
46
110
174
238
62
126
190
254
15
79
143
207
31
95
159
223
47
111
175
239
63
127
191
255

Decoding to HSB values

Internally, a PixelNote color code is an 8-bit number divided into three fields which encode an HSB (Hue/Saturation/Brightness) triple, with two hue values stolen to represent white and black.

(This scheme was designed so that many classes of graphics and photo manipulation could use simple and concise arithmetic to achieve colorful, interesting effects; meanwhile, 0 and 1 were borrowed to make it easy to create binary cellular automata such as Conway's Game of Life.)

Bits 0–3: Hue
0 and 1 are reserved for the non-hues of white and black, respectively. The remaining values step around the color wheel by 15- or 30-degree increments: 2=0°, 3=15°, 4=30°, 5=45°, 6=60°, 7=90°, 8=120°, 9=150°, 10=180°, 11=210°, 12=240°, 13=270°, 14=300°, 15=330°.
Bits 4–5: Brightness
Encoded in decreasing order, by 25% steps. 0=100%, 1=75%, 2=50%, 3=25%. Brightness has no effect on black.
Bits 6–7: Saturation
Encoded the same as brightness. 0=100%, 1=75%, 2=50%, 3=25%. Saturation has no effect on either black or white.