You Gotta Have Blue Hair

Everything About Fiction You Never Wanted to Know.
Blue, purple, green, no hair dye required.

"And for some reason, I got blue hair. You gotta have blue hair."

Strong Bad describing his anime counterpart Stinkoman, Homestar Runner, "Japanese cartoon"

There are plenty of ways for characters to be differentiated from each other, but one of normally limited utility is hair color. Human hair has a limited amount of variation after all, even less if you want everyone on a half hour show once a week to be easily distinguished. Thus, this trope was born, so that artists could have the full spectrum of color to utilize. It's so common that it's mostly considered an Acceptable Break From Reality now.

More than most media, anime characters often have impossible hair colors. This started with manga series that used distinctive colors on the covers to make characters stand out, as they all had either dark or light hair in the actual black and white pictures; anime just brought it to the screen.

There are several reasons why artists do this. The first, as noted, is to help distinguish characters from each other, similar to the reasoning behind Anime Hair. It may be done to indicate character personality, such as an Emotionless Girl with blue or white hair. It may be done to indicate uniqueness from the rest of the cast if they are the only one with their hair color. Or, it may be done just to suit the artist's taste for variety.

As it happens, this trope is Truth in Television to a degree - even The Other Wiki knows You Gotta Have An Article About Blue Hair.

This trope is a Sub-Trope of Hair Colors. For hair which is depicted as an odd color, but which is supposed to be a normal color (e.g., powder blue standing in for grey), see Hair Color Dissonance. When the hair color is realistic but is not justified by the setting, that's Implausible Hair Color. See also Mukokuseki and Amazing Technicolor Population. For characters with impossible hair styles, see the Anime Hair Trope.

Shy Blue-Haired Girl is a Sub-Trope that is about blue-haired girls specifically. Same thing for Rose-Haired Girl and pink-haired girls, as well as White-Haired Pretty Girl and White-Haired Pretty Boy. Elemental Hair can often overlap.

Examples of You Gotta Have Blue Hair are listed on these subpages: