I only now realized that the ANSI color codes for red (1), green (2), and blue (4) are arranged on powers of two and that the rest correspond to addition of the primaries: 3=yellow, 5=magenta, 6=cyan, 7=white.
@Bombe someone was paying attention to prior art in the field. ;)
@pesco Huh. Can't recall if I've thought about this -- but yeah, it's straightforward 1bit-per-channel, 3bit color.
@pesco Wow. Wait. WOW. WOW. O_O
@pesco Holy shit! mind_blown.gif
@pesco duh. EGA and VGA colour palettes as well. :)