is it safe to paint rainbow?

Solution
Hi vixl2ds
yes it will be fine as long as you allow time for the paint to dry and dont get any on the molex pins
there are black sleeved alternatives of what you have
It's safe to spray paint the wires, but make sure not to get any even near the metal pins. I'd fold some paper over the pins (to stop tape residue from getting on the metal) and then wrap both of the black ends in tape thoroughly to seal it before painting it.