Dye can be used at the dyer's shop to change the color of cloth or thread.
Dye is made by milling certain plants at a millstone or quern. Usually all caravans will bring dye for trade too. Importing dye, however, is only useful if you have a somewhat skilled dyer, otherwise little value is added and the work wasted. It is better to buy or grow the 'source' plants if available and mill them yourself. Of course, the nice colours are a value in themselves, if you don't stuff it all in bins.
On the stocks screen, dyes are listed under powder. Dyes are stockpiled as "Food/Milled Plants", along with flours. Barrels that contain only powders are called 'Mill barrel'. Each barrel can contain up to 60 dye bags, each bag containing one stack of dye items. Bag contents are not recognized in the manager's work order conditions. As a workaround, referencing the dye bags is advised: item type 'boxes and bags', trait 'dye item'.
In theory, dyed objects can be colors other than the basic 16. However, the game displays them using the basic color that is the nearest match (dimple dye is (dark) blue, and emerald dye is light green).
Dyes can be applied either to woven cloth or to the raw thread. Dyed items have their value increased by value of the dye (see table above), multiplied by quality with which the dye was applied. There is not known to be any difference in the end product based on when the dye was applied during the production process. Dyes can't be applied to finished goods made from cloth, such as clothing, bags, or crafts.