When it was done in anime/manga mainly with female characters-
Blue(usually dark) - Mature motherly adult female.
Rainbow - That was never a thing or maybe done with a character's highlights but didn't change the other color's meaning.
Purple(usually dark to the point of being black) - Reserved for young female characters. Indicates immaculate kindness, manners, and traditions and they grow up to be like the Blue haired characters.
Green - Usually a young female character that lost everything to tragedy but still retains her childhood innocence. Tends to trigger other male character's Big Brother/Papa Wolf instincts.
Pink - Loves living life to the fullest but tends to be naive about plot issues or is a cuckoocloudlander to one degree or another.