I haven't done what you are looking for, but this thread may answer your questions.
Side Roof Rack Rails - NEED HELP PLEASE..
I didn't read all of it, but it looks like you can tug the plastic caps off and just have the chrome piece. I hope it helps.
Also, why not just take the car to the shop and have it painted there, that way you don't need to even mess with taking the piece off and worrying about losing a nut or not having the rack retightened to the proper specs?