How Add Color Palette on a Keyboard Key or Controller?

How can I / or Wish Add to this Software, when not is;
Add Color just Pressed on Keyboard or Arcade Stick etc?
I think it is a Greate Idea and it is not mine.
Is the same with Capcom, Taito, Konami, and Snk which have one of the best Sprite ever seen and that is just used like these back in the Day!
Hope I find some Answers!