The Theory of Dyeing