Color and shape are ways of identifying different drugs. Not only is this for doctors, pharmacists, but for patents. If you know that your Estrogen is a pale blue oval tablet, you can identify it from the other three in your habd by this means.
Drugs are tested, and patents are informed of possible side effects. Some of those side effects are from the coloring gents used. Some injections are suspended in peanut oil. Allergies to peanuts or nuts in general can have life threatening problems.
This is why it is never a good idea to self medicate. It can literally kill you.
Janet