A dye is a colored substance that has an affinity to the substrate to which it is being applied. The dye is generally applied in an aqueous solution. Categories of dyes are shown in Figure 1.
A pigment is a solid, insoluble material that changes the color of reflected or transmitted light as the result of wavelength-selective absorption. This physical process differs from fluorescence, phosphorescence and other forms of luminescence, in which a material emits light. Classes of pigments are shown in Figure 2.
Both dyes and pigments appear to be colored because they preferentially absorb some wavelengths of light. In contrast with a dye, a pigment generally is insoluble and has no affinity for the substrate.
References
1. M Balter, Clothes Make the (Hu) Man, Science 325(5946) 1329 (2009)
2. https://en.wikipedia.org/wiki/Pigment