Historically, ultramarine blue was made by grinding down the semi-precious stone, lapis lazuli.
For cosmetic manufacture, however, ultramarine blue is manufactured in the lab. Kaolin (China) Clay, sodium carbonate and sulpher are mixed together and heated in a kiln to get the characteristic blue shade.
The "raw" blue is then treated to remove impurities.
If you work with Ultramarine Blue, please note that the color can develop a "rotten egg" smell due to the presence of sulphur. This smell develops if the pH is above 6. To eliminate, keep the pH below 6 or add an acid resistant, and keep your pH above 6.5.