Just use tiny screens in each keycap. It was done pretty well on the Optimus with oled, and there was an earlier version of similar idea from the 80's with monochome lcd
Show Image
(http://img18.imageshack.us/img18/6392/theboard1.jpg)
That's a very expensive solution and the keys are not transferable to another board. I wasn't looking for individually programmable key legends or complicated animations. I wanted a much lower cost solution that could work with current, common mechanical switch technology with no or minimal modifications necessary to the switches, like Findecanor's suggestion of adding two color filters to keycaps via a triple-shot molding process. A two-color LED would still be required for the effect but no radical alteration of the switches or the board controller would be necessary. I think the ideal application for this would be for indicating which of the two most commonly used layers is active on a keyboard. For example, imagine flipping the Dvorak DIP switch on a Code keyboard and having the key legends change from QWERTY to Dvorak.
I'd rather have a switch design that can light up left and right sides independently without too much light bleed - and then you would need only doubleshot moulding or even cheaper keycaps.
This idea, if not easier to implement, may produce a better result than mine. It would require compartmentalizing the keycap. The only sticking point would be how easily the switch can be modified to support two independently controlled LEDs.