Dye

Dyes are a set of 16 items used to change the color of wool, leather armor, hardened clay, certain mobs, the patterns on banners, shulker boxes   and glass.

Obtaining
Most dyes are produced by crafting various flowers or other items, or by combining other dyes.

Other
Lapis Lazuli can be mined from lapis lazuli ore in amounts of 4 to 8 per ore. They can also be bought from cleric villagers.

Cocoa beans can be harvested from cocoa pods in amounts of 1 to 3 per fully grown pod. A pod that is not fully grown will only yield one cocoa beans.

Ink sacs can be dropped by slain squid in amounts of 1 to 3 per squid. Looting can increase this amount.

Pocket Edition
Ink sacs can be found in dungeons and blacksmith chests, and can be obtained by killing squids.

Dyeing wool and mobs


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

Dyes can be on sheep to change the color of the wool. 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. 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. Note that the color combining follows the same rules that dyes use – red and yellow sheep will produce an orange lamb, but a blue and yellow sheep cannot create a green lamb. The unlimited reproduction of colored sheep makes dyeing and shearing sheep infinitely more efficient than just dyeing wool directly. Dye can also be used on tamed wolves. a dye on a tamed wolf will change the color of the wolf's collar (red by default) to the color of the dye.

Dye can also be used on shulkers.

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

Staining glass
Stained glass can be stained by placing 8 blocks of glass around a dye on a crafting table. Just like regular glass, stained glass can be crafted into stained glass panes. The recipe for this is the same as with regular glass.

Dyeing armor


Leather armor can be dyed by:
 * Crafting dyes with a piece of leather armor,
 * Dousing the leather armor or leather horse armor in a cauldron to which dyes have been added.
 * Combining the dye with a piece of leather armor in the inventory

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 with undyed water.

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 would be invalid in the 8 bit RGB color model).

Dyeing firework stars
A firework star can have a single color or a combination of up to eight colors when crafted with dyes. Adding one or more dyes to a crafted firework star will add a "fade to color" effect to it, overwriting any existing fade colors.

Banner patterns
Dyes are used in most banner patterns to determine which pattern and what color is used.

Dyeing shulker boxes
Shulker boxes are created purple by default and can be dyed any color.

Concrete
Dyes can also be used to craft concrete powder.

Other uses
4 colors of dye have other uses specific to those colors; see their separate articles for the details.
 * Ink sacs are used to craft dark prismarine and book and quill.
 * Cocoa beans are used to craft cookies and can be planted on the side of a jungle wood block to grow more cocoa beans.
 * Lapis lazuli is used in enchanting and to craft the lapis lazuli block.
 * Bone meal is used to fertilize various plants, craft the bone block, and create huge mushrooms.

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

Secondary
Secondary dyes are created by combining primary dyes together.

Data values
All the dyes have the ID name. The color of a dye item depends on its metadata. The "color codes" are used to determine the color imparted on sheep, wolf collars, and dyed leather armor. The hex value is shown in the extended tooltips of dyed leather armor; however, to set the color using an NBT data tag in a command, the decimal value must be used instead.

Trivia

 * Players can obtain each one of every color with 1 cocoa bean, 2 yellow dye and ink sacs, 3 green dye, 4 lapis lazuli and red dyes and 6 bone meal (2 bones).
 * 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.
 * In Pocket Edition, tertiary colors, along with their regular crafting recipes, can be crafted with primary colors. E.g.: Magenta can be crafted with one rose red and two bone meals.
 * The colors of the dyes match the chat colors in Color Codes except for brown, which is replaced with another blue.

Farbstoff Tintes Colorant 染料 염료 Kleurstoffen Barwniki pt-br:Corante Красители 染料