Happy 4th of July, everyone!
I started out with @luz’s drivers from his messagetorch project. Because at maximum PWM duty cycle the brightness of the LEDs is ordered as blue > red > green you end up with magenta tinting with all three set to 255, so the red and blue are scaled down proportionally to estimated radiant intensity.
I ended up taking the values from gamma.h in the NeoMatrix library and scaling them like so. This reproduces grays, and duller colors without magenta tinting, as well as white and cream colors very well. It feels rather kludged together, but hopefully it works on other WS2812/WS2811 strips. Here’s the new tables:
static const byte _G[32] = { 0, 2, 4, 7, 9, 12, 14, 17, 21, 25, 29, 34, 39, 44, 51, 57, 64, 71, 79, 88, 97, 107, 118, 129, 140, 152, 165, 178, 192, 206, 221, 237};
static const byte _B[32] = { 0, 1, 3, 4, 6, 7, 9, 11, 14, 16, 19, 22, 25, 29, 33, 37, 42, 46, 52, 57, 64, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155};
static const byte _R[32] = { 0, 1, 3, 6, 7, 10, 12, 14, 18, 21, 25, 29, 33, 37, 43, 48, 54, 60, 67, 74, 82, 91, 100, 109, 118, 129, 140, 151, 162, 174, 187, 200};