From what I've seen, the brake is disassembled and the caliper is powder coated and is dropped in an oven for the paint to set and cure.
I believe you can't just use any old paint because:
A) brake fluid will remove it
B) it probably couldn't stand up to the heat
But then again, I don't have any experience with it myself, so I could be wrong.