What does the phrase “dyed in the wool” mean and How did it originate?

Probably back beyond the days of Jacob, who gave his favorite son, Joseph, a coat of many colors”, it was known that if the wool were dyed before it was made up into yarn, or while it was still raw wool, the color would be more firmly fixed.

The figurative sense, to have one’s habits or traits so deeply ingrained as to be inflexible, seems not to have been used in England before the late sixteenth century, for a writer of that period thought he had to explain his meaning when he used it.

This was odd, for England was largely dependent upon her textile industry then and earlier for her existence, and any allusion to that industry should have been immediately evident to any Englishman.