The link between color and emotion is imposed by society in different ways for different ages
Adults also mapped emotion to color differently from children. The adults were very consistent in their choices of color to associate with emotion: Happy was yellow, Sad was black, and Angry was red. Children, by contrast, chose a range of colors to associate with each face. Happy tended to be red, and Sad tended to be blue, but each color was chosen for each emotion more than once. No single color was a favorite to represent Angry. One significant correlation Zentner did find is that children tended to associate bright colors with Happy and dark colors with Sad.
http://scienceblogs.com/cognitivedaily/2005/06/13/color-preference-in-kids-and-a/
For children the language might be a constraint when learning colors
Divorced from context, most two and three-year olds might as well be colorblind; certainly they look that way when asked to correctly identify colors in a line-up, or accurately use color words in novel contexts. What’s more, psychologists have found that even after hours and hours of repeated training on color words, children’s performance typically fails to noticeably improve, and children as old as six continue to make major color naming errors.
http://www.scientificamerican.com/article/why-johnny-name-colors/
How is the pink vs. blue bias shaped in children
When one-year-old girls and boys were shown pairs of identical objects such as bracelets, pill boxes and picture frames, but with one object pink and another of a second colour, they were no more likely to choose pink than any other colour. But after the age of two the girls started to like pink and, by four, boys were determined in their rejection of pink. This is the precise time when toddlers start to become aware of their gender, to talk about it and even to look around them to see what defines boy and what defines a girl. But just like adults, even very small children show biases towards their own group.
http://www.bbc.com/future/story/20141117-the-pink-vs-blue-gender-myth