There is a 2 or 3 part (depending on pilot class) functional test performed at Flight Standards District Offices.
Everyone must take and pass an OCVT (occupational color vision test) consisting of chart reading and a signal light test.
For Class 1 and 2, a Medical Flight Test is required. This test requires going up in a plane with a Flight Standards Inspector who will takes the pilot through specific testing.
The pilot only gets one shot to take these tests, if they fail any part, they will have a permanent restriction on their flight certificate that limits them to only flying during daylight hours.
The online link for Decision Considerations regarding Color Vision in Aerospace Medicine can be found on the Guide for Aviation Medical Examiners (faa.gov)