Hermit Crabs are very, very picky about their shells. A painted shell is NEVER a good idea. Even though they are sold by pet stores, the paint can chip off and be eaten, poisoning your crab. They also are not as breathable as a natural shell. Most of the time, they will immediately change out of the painted shell when a natural one is given. They grow slowly, so make sure to have multiple shells that are similar in size to the current one, as well as some larger ones.
But fear not! There are plenty of colorful natural shells your crab will love to wear and you will love to look at! Some examples are: Green turbo shells, a favorite of purple pincher crabs (the most common pet hermit crab, usually purple and orange):
Candy cane snail shells: (the color is generated by the diet of the shell's original owner, the candy cane snail!)
There are plenty of other pretty shells that aren't as bright they are sure to love. Purple Pincher crabs tend to love any kind of turbo shell, and Ecuadorian crabs (the other kind of hermit crab, typically light brown or white with oval eyes) like slit-type openings.