What is different between the pigment of giraffes and the pigment of flowers?
Pigmentation in most animals which is between black, brown, red, yellow and which is made up by the mixture of two pigments: Eumelanin (yellow to red) and Pheomelanin (black to brown). The ratio between these two makes a color. These are pigmental colors which are made by a special kind of cells in the skin, in mammals they are called melanocytes (and I will only look into mammals here, as this is already complicated enough). Additionally there are other colors, especially in fish and insects iridescent color play an important role.

This pigmentation is made by a cascade of enzymes from the oxidation and polymerization of the amino acid tyrosinase. So there are no minerals involved in the process. See here for more details.

For the pattern: As far as I know the literature, these pattern by x-inactivation are only present in cats. Here one of the enyzmes which is important for the generation of the dark pigment is encoded on the x-chromosome of the animals. Gene defects on this chromosome then lead to pigmentory defects.

Pigmentation patterns can be explained by a model which was formulated by Alan Turing and which is called "Reaction Diffusion Model". You can find an interesting article about this in reference 1.

Basically two different morphogens (different pigment cells) influence each other with positive and negative signals. If these signals would occur independently, than only relative incomplex two-dimensional colorations would be possible. See the figure from reference 2:



References:


How the zebra got its stripes, with Alan Turing
Reaction-Diffusion Model as a Framework for Understanding Biological
Pattern Formation