Color is an uncertain characteristic for the determination of minerals. Many minerals occur in a variety of different colors. Examples are quartz with its color variants amethyst, rose quartz or smoky quartz or feldspar with color variants like amazonite. However, if the minerals in a rock are reliably determined, their different coloring can be used to quantify them. In this example we use a simple RGB photo taken with a smartphone to determine the amounts of quartz, plagioclase, alkali feldspar and dark minerals such as biotite and hornblende in granite. To facilitate the differentiation of minerals, we use a principal component analysis (PCA), which is also used to unmix and classify spectral images such as satellite images (Trauth, 2020).