During my thinking process... this is the decision that I came to.
A good automated coloring scheme picks a users highest priority color and pairs it with the highest priority input. I.e, favorite color one goes with mames input1, favorite color 2 goes with mame's input2. For more complex color requests, there is the option of using romname.lwa files, which I think you already support (am I wrong on that?) From a user interface perspective, that provides some context for the button's functionality. Many games (somewhat) have a primary & secondary, tertiary button priorities, and Mame's cfg is written somewhat like that. Not a major rationalle for this method, but better than a shot in the dark.
For the SetLedWiz, I used the LED cfg to explain where the LEDS were. Then I used the color CFG to set the color priority. Input 1 will always use "red" Input 2 will always use "blue" regardless of the KEYCODE assigned to Input 1.
It gets more complex when you assume that a user will always want KEYCODE_X button to always be a certain color. I haven't provided for that eventuality yet, but I will... basically the option to choose between color priority, and color position, would seem to me to be the basic differences between user color choice for button highlighting. Any deeper scheme would be more on a Case by case basis, a la the LWA files.
To sum up, with RGB lighting, to me there would seem to be the following color cases;
1. Contextual lighting
2. Positional lighting
3. Per Game custom lighting.