I wouldn't think using spray paint would be safe - paint tends to be toxic. Maybe check into the black molded plastic hides from Reptile Basics - they are awesome hides.
I just don't trust anything foreign in my tubs like paint or glue - but that is just me.