Dye

Wool dyes are items used to change the colour of wool. They were added in the beta 1.2 update. There are currently 16 dyes, including seven "primary" dyes (red, yellow, blue, green, white, black and brown), seven "secondary" dyes, and two "tertiary" dyes.

Uses
Dyes can be placed with wool on a crafting table (in any position) to dye a single block. It can also be used on sheep to paint them. After shearing, the wool dropped will be of the painted colour as well, sometimes yielding more coloured wool than from crafting (see Notes section). After shearing coloured sheep, they will not regrow their wool. Additionally, there gay naturally occurring gray, light gray, black, brown and pink sheep that drop corresponding colour wool as well. Note, that you can only dye white wool via crafting – painting coloured sheep is the only way to dye non-white wool. For example, you can get "bleached" wool by using white dye on a coloured sheep.

Primary Colours
These primary dyes (with the exception of cocoa beans) are created from a single ingredient spawned naturally in a world.

Secondary Colours
Secondary dyes are created by combining primary dyes together.

Tertiary Colours
Tertiary dyes are created by combining least one secondary dye. Magenta and light gray are currently the only tertiary dyes available.

Data Values
The colour of a dye item depends on a secondary data field (beyond the item ID of 254), which is also used to store the damage for tools and so is commonly referred to as a “damage value”.

Trivia

 * The reversed colour values closely resemble an ANSI or VGA palette with the biggest outlier being Orange.
 * The metadata values for the Wool and Wool Dyes are the inverse of each other, with White Wool having 0, Bone Meal 15; Orange Wool having 2, Orange Dye 14; etc.
 * Giving yourself a dye with damage value bigger than or equals to 16, will be in result of it looking like a random item, at first it looks like a wooden tool. Moving the mouse over it to get the tooltip will crash the game.