Dye

If you were looking for dying, see Health.

Dyes are items used to change the color of wool, leather armor, hardened clay, and mobs. There are 16 dyes, which includes Bone Meal, Light Gray Dye, Gray Dye, Ink Sac, Rose Red, Orange Dye, Dandelion Yellow, Lime Dye, Cactus Green, Light Blue Dye, Cyan Dye, Lapis Lazuli, Purple Dye, Magenta Dye, Pink Dye, and Cocoa Beans. The majority of the dyes are renewable resources.

Most dyes are obtained by blocks and items that spawn in the world and then be extracted in various ways, such as crafting, smelting or mining. Some dyes can only be obtained through combinations of specific dyes.

Dyeing wool and mobs


Players can dye wool by placing a white wool and a dye on a crafting table.

Dyes can be used on sheep by right-clicking sheep with a dye. After shearing a colored sheep, they will drop the corresponding color of the wool, as well keep the color of their wool when it regenerates. Additionally, there are naturally occurring gray, light gray, black, brown and pink sheep that drop corresponding color wool. Breeding colored sheep will result the baby sheep's color to be one of the parental sheep's color, or a resulting color of the combination of both parental sheep's color. The unlimited reproduction of colored sheep make dyeing and shearing sheep a far more efficient method to obtain dyed wool than just dyeing a wool directly. Dye can also be used on tamed wolves, except on the Xbox 360 Edition. Right-clicking a tamed wolf with a dye will change the wolf's collar (red by default) to the color of the dye. This can be helpful when players are organizing multiple tamed wolves.

Staining hardened clay
Hardened clay can be stained by placing 8 blocks of hardened clay around a dye on a crafting table.

Staining glass
Like hardened clay, stained glass can be stained by placing 8 blocks of hardened clay around a dye on a crafting table.

Armor dyeing


Leather armor can be dyed by crafting dyes in with a piece of leather armor. There are a possible combination of 12,326,391 colors, as it is possible to put more than one dye on the crafting bench alongside the leather armor. Armor can be dyed multiple times with previous colors affecting the final outcome. Colored armor can be reverted to their original color using a cauldron.

The game has a specific formula for calculating the color of dyed armor: each color, in the RGB color model, has a red value, green value, and blue value. For each dye in the crafting grid, and the armor itself (if it is already dyed), the red, green, and blue values are added to running totals. In addition, a running total of the highest value (be it red, green, or blue) is also kept. After this, each total is divided by the number of colors tested. This effectively produces the average red, green, blue, and maximum values. The maximum value of the average RGB values is also calculated. Finally, each average RGB value is multiplied by the average maximum value, and divided by the maximum of the average RGB values. The modified average RGB values are then used as the final color. This procedure can be summed up with the following equations: for each color (all "total" variables start at 0 before counting): totalRed = totalRed + redValue totalGreen = totalGreen + greenValue totalBlue = totalBlue + blueValue totalMaximum = totalMaximum + max(red, green, blue) numberOfColors = numberOfColors + 1 averageRed = totalRed / numberOfColors averageGreen = totalGreen / numberOfColors averageBlue = totalBlue / numberOfColors averageMaximum = totalMaximum / numberOfColors maximumOfAverage = max(averageRed, averageGreen, averageBlue) gainFactor = averageMaximum / maximumOfAverage resultRed = averageRed * gainFactor resultGreen = averageGreen * gainFactor resultBlue = averageBlue * gainFactor

Due to the way this formula works, the resulting color will never be darker than the average of the input colors, and will often be lighter and more saturated. Of course, the resulting color will never be lighter or more saturated than the lightest or most saturated input color. In addition, this formula will never create an RGB value higher than 255 (which is invalid in the 8 bit RGB color model).

Primary colors
These primary dyes are created from a single ingredient spawned naturally in a world.

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

Tertiary colors
Tertiary dyes are created by combining at least one secondary dye.

Data values
The color of a dye item depends on a secondary data field (beyond the item ID of 351), which is also used to store the damage value for tools. The "color codes" are used to determine the color imparted on sheep, wolf collars, and dyed leather armor.

Trivia

 * The reversed color values closely resemble an ANSI or VGA palette with the biggest outlier being orange.
 * The metadata values for wool and wool dyes are the inverse of one another, with white wool having a metadata value of 0, bone meal 15; orange wool having a value of 1, orange dye 14 and so on.
 * Players can obtain each one of every color with 1 cocoa bean, 2 yellow dye, 3 green dye and ink sacs, 4 lapis lazuli, 5 red, and 8 bone meal (3 bones).
 * Giving yourself a dye with a damage value greater than 15 will result in an object which resembles some other in-game item, such as a wooden tool, and moving the mouse over the item to view its tool-tip text will crash the game.
 * The dyed sheep breeding behavior mirrors Lamarck´s theory, in which the organisms evolve inheriting the external changes and adaptations of the previous generation, transmitting them to their offspring.
 * When coding recipes including items with metadata, such as dyes, rather than just making an item, you must create a stack of one item that includes the metadata.
 * A few of the dye items also have unrelated crafting recipes or special uses:
 * Cocoa beans are used for cookies.
 * Lapis lazuli can be condensed into a lapis lazuli block.
 * Ink sacs are used in a book and quill.
 * Bone meal can be used to speed a plant's growth, or on a grass block to spawn tall grass and flowers.
 * In Pocket Edition, the only way of getting Black, Brown and Gray wool is by finding a Sheep of the color in the wild, as Ink Sacs and Cocoa Beans are only obtainable via third-party editing.
 * Inc Saks can be obtained in Creative mode by charging a bow, and shooting it while switching to bonemeal. Takes multiple tries.
 * You can also do this with spawn eggs, and get a .name< spawn egg.
 * Cocoa Beans have a different texture than in PC, and look more like recolored Bone Meal. This is in fact the old texture.

Farbstoff Wool Dyes/es Colorant 염색약 Kleurstoffen Barwniki pt-br:Tinturas de Tecido Красители 羊毛染料