As a general reminder, if you have fallen and the helmet took the impact, replace the helmet. If your helmet has been damaged through other means, replace it. They are not meant to be reused after keeping your brain within its skull.
Just like hardhats, you want to inspect them frequently and there is a good chance they have expiration dates. I would be cautious painting them as the chemicals may damage the integrity of the helmet, especially the foam. We always just covered them in stickers. When in doubt, check with the manufacturer.