I suspect it’s more of a policy than legal statute. Since color vision deficiency is an automatic DQ, limiting those who have it to service in Restricted Line (RL) warfare communities or certain Staff Corps Officer communities, and USNA’s mission is to produce Unrestricted Line Officers (URL), there is a cap in place on those particular waivers. Every year, usually during the pre-comm physicals, additional mids test color deficient, and have to be diverted to RL, reducing URL-ready mids.
There is a famous story that Roger Staubach tested color blind during his pre-comm physical.