The vast majority of your inexpensive hardware is simply painted with epoxy enamel paint. If you prep the surface you intend to paint properly, it's pretty good stuff.
There are lot of different epoxy enamels, and you can buy them in a lot of different forms. Sherwin Williams sells it as Polane or heavy equipment/tractor paint, gun refinishers use Dura Coat, and you can buy it at the hard ware store as appliance epoxy enamel, I believe it's made by rustoleum. Lots of other manufacturers and trade names as well.
If you decide to do it yourself, you need to scuff up the surface really well so it will hold the paint. Clean thoroughly, then spray on the enamel. You can let it air dry, but it will fully cure and be harder if you bake it. 170 for 30-45 minutes will do the trick.