A SODA or Statement of Demonstrated Ability.
Specifically, I have deuteranomalous trichromacy (which is probably not spelled exactly correctly), so while I don’t see green exactly the same as folks with normal color vision I still have some perception of it. It’s quite common for people with that to obtain SODA’s.
Basically, they take you out to an actual airport tower and flash genuine light signals at you, such as would be used if, for example, your radio wasn’t working and the tower still needed to communicate with you. If you are actually able to correctly identify all such signals in such real world conditions you have Demonstrated your Ability to do so and thus are issued an official Statement saying you are not a safety hazard and have fun flying (Ok, not so much those last four words). I then carried it along with my license and medical whenever I flew.
Had I not passed the test I would have still been allowed to fly in the day time and when/wherever light signals were not required.
This is allowed under US rules - not all nations permit the colorblind to fly at all. Which leads to the interesting question of whether or not US pilots permitted to fly under such rules are permitted to fly in those nations. But that’s for another discussion.