Not as directly as you seem to be thinking.
It depends on the paint and the material.
Simple paints just soak into the surface, so then a porous surface is important.
However many modern paints are almost coloured glue and will stick to a wide variety of surfaces.
Thanks for the reply. What about other coatings besides paint? Here is an example, i was just thinking about the coating aitsoft bb manufactures use to coat the bbs so that they fly better. Would hardness of the bb determin if their coating sticks better?
Thanks. I know this is an odd question but it stuff i never think of haha