Yep. That’s what a couple of plugins do, including Colormap. There’s even a LED-Palette-Theme plugin that aims making this a little bit easier. Mind you, that one pretty much depends on EEPROM. But a similar idea can be made for RAM- or PROGMEM-based palettes too.
Cool, I will have to look into this. I hope that’s the secret to getting the memory usage down to something sane… Make a list of up to 256? colors and just specify one of those for each key… that should surely do the trick.
With so few “pixels” I’d think 256 colors would be overkill. I bet a small number of colors (16?) would suffice with a simple brightness-adjustment algorithm.
Yeah, I suppose you’re right, but I still need to make different brightness variations of each color somehow without actually using a variable for that. I suppose I’ll have to compute the color with brightness factor at use instead of storing it in a variable.