I debated about painting mine but decided to just plastidip them for now. I'll probably be replacing the rack relatively soon anyway but if I decide to keep it I'll take it and have it professionally stripped and powdercoated.
I'd plan on two cans for the end cap covers and the rails, three if you have to 'dip the crossbars too. My covers are black already but it took me a full can and one coat from a second to do just the rails. My crossbars were black also but I also left them off for now. I'll most likely put my Yakima Railgrabs and bars on instead.
I also removed them from the truck as I don't see that it's possible to do a good job while installed, and you'd have to mask the whole truck to prevent overspray.