My recommendation is not to paint directly onto the hat, but to make a pattern of the hat with pieces of thick white cotton, and then apply the paint to that.
This will both be easier than painting a 3D object like a hat (because you'll be painting it flat instead), help you avoid mistakes (because you can replace the cotton pieces if need be) plus give a superior result as the colours will not be true if you paint them onto black.
Plus, depending on what adhesive you use, you should be able to avoid damaging the hat and restore it afterwards to its original form and finish.
Alternatively, if you prefer to paint directly onto the hat, I suggest a white undercoat first.
Also: very important: use fabric paints, not acrylic as you'll get a better result and it will be easier to work with.