I found the below info. In 1968 is was found that parrotfish, like wrasses, can undergo sex reversal. In this case, a female fish becomes a male. Secondary males are sometimes called supermales or terminal males. Females and primary males look alike and are red, gray, brown and black.
Secondary males are bright green, blue, red and yellow.
There a re also some species that maintain the same colors throughout their lifetime. As if this is not confusing enough, some parrotfish can change their colors to match the surroundings. Some species move to specific areas to spawn, typically into deeper areas of the reef. Supermales pair up with one female to spawn, while primary males mate with small groups containing one female and several males. After spawning, they return to the shallow water at night.