Painting brake calipers is a popular way to dress up the wheels, but if yours are rusty you cannot just spray over them. Here is how to handle painting over rusty calipers.
Rust must come off first
Paint will not bond to rust - it will bubble and peel within weeks; see caliper paint peeling. You have to remove the loose rust and scale down to solid metal with a wire brush, sandpaper, or a rust converter before any paint goes on.
Clean and degrease
After de-rusting, clean the caliper thoroughly with brake cleaner to remove grease and dust so the paint sticks; see caliper painting. Mask off the bleeder, boot, and any rubber - do not paint the rubber or sliding surfaces.
Use high-temp caliper paint
Calipers get hot, so use paint made for calipers (high-temp). Apply thin coats and let each cure. Regular spray paint will discolor or peel from the heat.
Better yet, if it is badly rusted
If a caliper is heavily corroded, the rust may also be affecting the piston and pins - consider whether it needs service or replacement, not just paint; see caliper condition. Keep the brakes working with quality pads and hardware.