In the US, sexual preference, marital status, and religion are protected as is gender and color. Age is also protected, but the protections have limits, e.g, an 85 y.o. is not protected when applying for an entry-level position.
FYI, the
protected classes in USA are "sex, race, age, disability, color, creed, national origin, religion, [and] genetic information".
However, federal laws offer the following protection (grouped by first year any protection was implemented):
1963:
- sex
1964:
- race
- religion
- national origin
1967:
- age
1968:
- familial status
1973:
- disability
1974:
- veteran status
1978:
- pregnancy
2008:
- genetic information
Other pitfalls for employers include union affiliation, marital status, retaliation, and harassment (sexual or otherwise).
Note that sexual orientation and gender identity are NOT expressly protected under any Federal law*. Though the Federal government does protect those for its own hiring, it does not apply to other employers. This is why in most states, you can go have your same-sex wedding on Saturday, and then be fired on Monday
after your boss sees the wedding pictures. Now, the EEOC itself interprets the Civil Rights Act of 1964 as covering LGBT people under the "sex" umbrella, but this is essentially just an agency's policy, and could very well fail in court.
*Some states offer protection to either or both of those groups, at the state level of course.
As to the concrete issue of color perception deficiencies: In USA, this would fall under "disability", and thus is fundamentally protected. However, protections are subject to the exception for "bona fide occupational requirements", and if identifying colors is a legitimately necessary function of the job, and reasonable accommodations (organizational or technological) cannot be made, then it's not a violation of the law. (Examples of allowable bona fide occupational requirements include the requirement to lift a certain weight of box, or that to model clothing for little girls, you must be a little girl, or that you must be a US citizen for a position that requires a US government security clearance.)
IANAL, but I would interpret this as today allowing exclusion of color blindness for an electrician job (since you can't always have someone else with you to identify wires), but that this exemption might become illegal as assistive technology changes. For example, if someone makes a demonstrably reliable augmented reality app (e.g. for Google Glass-like hardware) that can identify the colors and overlay the names or some other identifier.