Pigments used in paint and pigments used in dyes have overlapped at various times in history.
The Forbes pigment collection at the Fogg Art Museum at Harvard University has over 2,500 specimens. It’s mostly used for scientific analysis for verifying paintings and checking authenticity.
The oldest forms of paint were pure pigment. Ochre was used from cave paintings to Ancient Greece. Black is straightforward to produce in the form of charcoal from the fire.
Different forms of paint are made with different types of binders. Egg tempera is made with pigment, egg, and clear alcohol. It dates to the Middle Ages and was used to illuminate manuscripts. These days it’s most commonly used to make Greek Orthdox icons. The one time I had the chance to try the technique, I had codeine in my system and I got tipsy off the vodka fumes. Whoops!
Oil paint became popular in Europe in the 15th century. It had been used in India and China much earlier. While various oils have been used over the years, I understand that most modern oils are based on linseed oil.
The specific pigment plus the specific binder will affect the chemical composition. Some have very specific timelines. In 1826 synthetic ultramarine was discovered as the result of a competition. Natural ultramarine was rare and therefore expensive.
Madder was used as both a dye and a paint pigment. It’s a plant based red which needs a mordent to set it to cloth. Lots of onion skins can produce a pale brown through the same dye process.
Modern dyeing processes can be toxic and dangerous. A some Australian textile artists specialise in Natural dyeing including Belinda Evans, Myf Walker, Belinda Sheekly and many others. Most of these artists are interested in the ecologically friendly but usually mordent still has to be used. Mordents include alum, iron, copper and tannin, and all except for tannin need to be disposed off carefully.