I can think of a couple of ways you might be able to do this. One option would be to edit the colors.ini file and change the joystick color individually for each game. This would obviously be a lot of work but has the advantage that you could specify the color on a game by game basis.
The other option would be to specify the joystick RGBs in the Device/Port Input file as single LEDs. For example, if the joystick RGB uses ports 1 (red), 2 (green), and 3 (blue), rather than set the LED Type as RGB-Red, RGB-Green, and RGB-Blue, you would set the LED Type to Single for all three ports and assign a different Port Label to each (like Joy1Red, Joy1Green, and Joy1Blue). Then you could set the keycode for each port individually for the desired joystick type (4-way or 8-way). If you set port 1 (the red wire for the RGB in this example) to JOY8WAY, then the joystick would light up red for all 8-way games. Since you have three distinct colors (red/green/blue), you could distinctly identify three types of joysticks. If you only want to identify 4-way and 8-way, then you could combine two of the colors for one of the joystick types - like 8-way could be red/green (yellow) and 4-way could be blue.