Headgear used in water polo and a number of underwater sports
A water polo cap is a piece of headgear used in water polo and a number of underwater sports. The caps are used to identify both the player and their team, and to protect their ears from injury possibly caused by a water polo ball hitting the head.
Caps are differentiated by the number printed on them as well as the color. Players from the visiting team will wear dark caps, whereas the home team players will wear white caps. The goalkeepers wear quartered red caps, numbered "1", while substitute goalies have caps which are either numbered "1-A" in NCAA games, or "13" in FINA international games. Thus, each team will have two sets of caps: one white and the other dark colored. According to the NFHS water polo uniform rules, the numbers on the cap contrast the color of the cap, and both the color of the cap and the color of the number contrast the color of the ball. 
In underwater football, underwater hockey and underwater rugby, water polo caps are worn by competitors to identify which teams they are playing for, and to offer some protection to individuals against the possibility of a burst eardrum caused by the blade of a fin making direct contact across the ear. Opponents in underwater hockey and underwater rugby wear either one of two colours - white or dark (i.e. blue or black) caps while the water referees wear red caps.  Underwater football appears to follow this precedent. Caps are also used in Aquathlon (underwater wrestling) for identification purposes; one competitor wears either a red or blue coloured cap while the other competitor wears a white or yellow coloured cap.