My guess would be it wouldn’t work for those lights, but I could be wrong. I’ve used RIT dye to dye some plastics before and in my experience it’d a crap shoot at what will absorb the dye and what will not. I don’t have a lot of experience with it, maybe someone who knows their plastics could say which chemical structures can take the dye and which can’t. I attempted to dye various plastic clips, connectors…etc and some worked, some did not.
I’d recommend testing whatever you want to dye before actually doing it on your real lights. You can pick up used lights at the junkyard or even just go to the junk yard and pocket some scraps of light housings that are already broken.
For something light a headlight housing though I think a spray on or laminate tint is likely just the easier/more reliable solution. You’d have more control over the color that way, it’d be more reliably “un-done”, and a lot less work since you wouldn’t need to completely disassemble the lights.