We call them colorants.
Dyes usually have specific chemistry for use with very specific materials.
The chemistry of the dye and the materials to be colored is a science all of its own. Pigments are very small, relatively insoluble particles in the micron size. Pigments are so small that they tend to have great surface attraction for each other. This causes them to stick together and create agglomerates. A pigment's efficiency in coloring a material is based on its ability to scatter and absorb light, which is directly related to the surface area of the pigment in the material.