First to mind came indigo dye, which at one time was derived from a plant, Indigofera suffruticosa. Sadly, these days the indigo dye used to color blue jeans and other fabrics is a synthetic something or other. You can also get a dye of indigo from the woad plant, but since it is often labelled an invasive and noxious weed, I don't think I would grow it. Or at least I would be rather cautious about containing it!
For an interesting book on growing dye plants, check out the following book: