Each color in PixelNote is assigned a number between 0 and 255.
- Colors 0 and 1 are white and black.
- Colors 2 through 15 are pure, bright colors.
- Add 16 to a color number to darken it.
- Add 64 to a color number to desaturate it.
Full color number table
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.