It did start out as a character in a series of children's books in the late 19th century by Florence Kate Upton, and was intended to be a positive magical person, but because she didn't copyright the character it ended up everywhere and became a quintessential icon of blackface.