VOOZH about

URL: https://minecraft.wiki/w/Talk:Dye

⇱ Talk:Dye – Minecraft Wiki


Talk:Dye

From Minecraft Wiki
Latest comment: 22 February by Simanelix in topic Number of ways to dye leather armor
Jump to navigation Jump to search

New color arrangement

[edit source]
Latest comment: 24 December 20221 comment1 person in discussion

In Java Edition 1.19.3, because of the new Creative inventory arrangement, arrangement of the color in game are now "White", "Light Gray", "Gray", "Black", "Brown", "Red", "Orange", "Yellow", "Lime", "Green", "Cyan", "Light Blue", "Blue", "Purple", "Magenta", and "Pink" instead of "White", "Orange", "Magenta", "Light Blue", "Yellow", "Lime", "Pink", "Gray", "Light Gray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", and "Black". But this is only in game, this wiki still follow the old color arrangement. This also occur in other pages such as "Wool", "Bed", "Banner", etc. Now for me, I 👁 Image
 Support this arrangement because this is a new color arrangement in Java Edition. 👁 Image
Brain180 "click here to talk" 06:24, 24 December 2022 (UTC)

As of 1.20 Pre-Release 1 (Java Edition), Colored Wool, Carpets, and Beds can now be dyed other colors.

[edit source]

This change should be reflected, but I do not know how to edit this wiki properly.

Eyeblossoms

[edit source]
Latest comment: 24 July 20254 comments3 people in discussion

In 1.21.4 (or 1.21.50), there are eyeblossoms. You can use closed eyeblossoms to craft gray dye and open eyeblossoms to craft orange. This changes should be reflected in the photo “A guide for creating all the dyes, from which leather armor can be colored in 5,713,438 possible colors”, the “An in-game guide for creating all the dyes” photo, and the crafting recipes in the “Obtaining” because they’re already in the “Orange dye”, the “Gray dye” and the “Eyeblossom” pages. 77.226.87.60 08:10, 12 December 2024 (UTC)

In “An in-game guide for creating all the dyes”, light gray isn’t connected to white. 2A0C:5A87:D08:7500:8D1F:69C9:F2E5:2365 18:04, 15 January 2025 (UTC)
In “A guide for creating all the dyes, from which leather armor can be colored in 5,713,438 possible colors”, closed eyeblossoms are incorrectly crafted into light gray dye instead of gray dye. 77.226.87.60 08:46, 5 February 2025 (UTC)
Also, shouldn't being able to use eyeblossoms to create gray and orange dyes be added to history. CrockCraftMC (talk) 17:54, 24 July 2025 (UTC)

Number of ways to dye leather armor

[edit source]
Latest comment: 22 February35 comments9 people in discussion

"In total, leather armor can be colored in 5,713,438 possible colors". This number is mentioned twice on the page, but it is not explained how one would calculate it. Two videos linked as references also don't mention this number at all. I have searched the internet and I only really found this reddit post: [1], where someone asks the same question, and the user Drakou112 responds:

As someone that calculated it, its just brute force. Try every single dye combinations until you can't get new ones. There's isn't really a cut and dry math equation so solve it since its way too complicated.

Is it really true? Even if so, it should be possible to verify the number with some code. Can we do that? Melwin22 (talk) 18:09, 29 June 2025 (UTC)

You know what, it's not that hard. I'll write code for it. -- Simanelix (T|C) 03:59, 29 July 2025 (UTC)
User:Simanelix/Dye has the code. -- Simanelix (T|C) 06:08, 29 July 2025 (UTC)
Okay. If "and the armor itself (if it is already dyed)" means what I think it means, then my original code will work on this. And that code can just try each dye on each discovered color. That means only 2**32 steps maximum. RAM is a bit of an issue though. -- Simanelix (T|C) 06:32, 29 July 2025 (UTC)
I don't think it's true. I got 6401371 as a lower bound. And if you're willing to wait you could literally let my code run all day. It won't take it too long to find more. You could also be smart and combine the lists. -- Simanelix (T|C) 06:58, 29 July 2025 (UTC)
Current Java Edition armor color record: 8122486. -- Simanelix (T|C) 23:37, 3 August 2025 (UTC)
i.e. at least that many colors can be made. -- Simanelix (T|C) 23:37, 3 August 2025 (UTC)
These results are very interesting!
So basically what you are saying is that the number can potentially grow further, if your code is running for a long enough time, with the absolute upper bound of 2^24? Or do you have any idea on a better upper bound? Melwin22 (talk) 16:39, 4 August 2025 (UTC)
2^24 is the best upper bound I can give. Though, I think the darker colors are harder to obtain than the brighter ones, due to the alpha variable in the mixing function. -- Simanelix (T|C) 23:09, 5 August 2025 (UTC)
What was the algorithm used to get this number? I ran a test (https://github.com/niknal357/minecraft-dye-search/), and found 5710940 to be the number of possible dye combinations.
I have found that https://anrar4.github.io/DyeLeatherArmor/ (which is the commonly cited tool for the 5713438 number), provides incorrect recipe instructions, such as for the colors #cdcf80 and #d07197, so I doubt it can be trusted.
I have no clue where people are getting 6401371 or 8122486 from either, and would love to see the sources.
I made sure that my algorithm matches perfectly with the game and that it would only halt once it has found all possible dyeable colors, so seeing larger numbers show up is surprising. Niknal (talk) 18:10, 5 August 2025 (UTC)
I checked again, and I did make a mistake when testing the https://anrar4.github.io/DyeLeatherArmor/ tool, however I still don't see how the number can be bigger than 5710940. The developer of does not release the full data file, so I cannot cross-reference it against my own. My best guess for the diffence is the following:
The tool's code and my code calculate color mixing slightly diffently:
The tool:
red = (int)((float)red * average / avgMax);
My calculator:
unsigned int redAverage = redTotal / contributorsF;
unsigned int brightness = std::max({ redAverage, greenAverage, blueAverage });
float scale = maxAverage / static_cast<float>(brightness);
static_cast<unsigned char>(redAverage * scale),
The integer division in the first line of my calculator matches what minecraft does (what the wiki documents), and this means that the tool's code will occasionally deviate by +/- 1 from the real value. This is likely enough to account for the ~2500 color difference. Niknal (talk) 23:07, 5 August 2025 (UTC)
Also, the wiki does NOT document what Minecraft does. In fact, I'm gonna fix that real quick. -- Simanelix (T|C) 23:13, 5 August 2025 (UTC)
Now that you updated it, and I double-checked all my code, my code does indeed implement what the game does.
I checked the the JS code you posted in User:Simanelix/Dye, and I found a deviation from the algorithm that is *now* documented on the wiki. You floor your averageMaximum, which is not the case in the algorithm posted in the wiki. Niknal (talk) 23:27, 5 August 2025 (UTC)
For reference, this is the actual game code https://pastebin.com/GGjQhyFa. Does it match the algorithm in the article?--Capopanzo (talk | contribs) 23:45, 5 August 2025 (UTC)
Yes, it's an exact match. -- Simanelix (T|C) 23:53, 5 August 2025 (UTC)
I can confirm, I just sifted through the java, and double-checked that the article matches the game's source. Niknal (talk) 23:54, 5 August 2025 (UTC)
I literally gave the source earlier in this discussion. It is User:Simanelix/Dye. You can run the JS code on its own and get the same results as me. Also, the current mixing function is correct. Me and someone on Discord tested it. -- Simanelix (T|C) 23:10, 5 August 2025 (UTC)
I tested your tool, and it works for 0xDEC0DE. Good job! -- Simanelix (T|C) 23:23, 5 August 2025 (UTC)
To clarify, https://anrar4.github.io/DyeLeatherArmor/ isn't my tool. It's a tool I found which seems to work, but documents a different total number of colors from what I got (and from what you got) Niknal (talk) 23:30, 5 August 2025 (UTC)
Well, I haven't maanged to finish running my code. But yeah, it's over 8 million colors. -- Simanelix (T|C) 23:39, 5 August 2025 (UTC)
Do you have a dump of every color you were able to get + how to get it? I'd be curious to see what my algorithm is missing. Niknal (talk) 23:41, 5 August 2025 (UTC)
No. I guess I'll prioritize adding a feature to save the recipes and make something for you. I need to go to the store and do the dishes though, so you'll have to wait a few hours. -- Simanelix (T|C) 23:46, 5 August 2025 (UTC)
No wories, I'll probably be going to sleep soon, but I'll be really curious to see what colors you found that my algorithm didn't.
If you are curious, here is a dump from my algorithm: https://github.com/niknal357/minecraft-dye-search/releases/download/runresult/final_reachability_results.txt
It is structured in 3 columns: resultColor | dyes to add separated by '+' | (starting color or BASE)
This allows you to traverse the file like a tree. I'll make an app for it later, but I really don't see what my code could've missed that yours found. Niknal (talk) 23:57, 5 August 2025 (UTC)
New record: 8132000. Gained by adding 1 to 8 dyes, and then adding 1 to 3 dyes repeatedly. -- Simanelix (T|C) 23:54, 5 August 2025 (UTC)
I know I'm a month late to the party, but I stumbled upon this on the wiki and decided to write my own code for it (https://github.com/Shxgegga/Minecraft-Dye-Mixing) and my number matches Niknal's exactly (5710940)
I tried reading your code, but I don't know much JavaScript so I didn't get too far, and don't know what exactly I'd have to run to generate your results myself. Would be very curious to see a dump of your results Shxgegga (talk) 23:49, 5 September 2025 (UTC)
I stumbled upon this discussion as well. I wrote my own tool (https://github.com/coinvariant/mc-armor-colors) and managed to reproduce the original number of 5,713,438 colors. Both your (@Shxgegga) and @Niknal's code diverge very subtly and in the same way from the decompiled code on pastebin.
The decompiled code has the following line repeated 3 times for each color:
n12 = (int)((float)n12 * f / f2);
Whereas your code adapts it in a way that is equivalent to:
n12 = (int)((float)n12 * (f / f2) );
These lines are not equivalent due to non-associativity of floating point operations. Unfortunately, it seems to me that you both made the same mistake. The original tool by anrar4 copied the algorithm correctly. I can reproduce your results by just changing the bracketing.
I think it is fairly safe to say that the number of colors is and indeed has been 5,713,438 after all. Aerialfiddle (talk) 03:26, 25 November 2025 (UTC)
Yes. I updated the actual page to say this specifically by the way. Did you by chance read my updated text? Or are you coinvariant? --   Simanelix   (T|C) 05:38, 25 November 2025 (UTC)
Nvm, you are coinvariant. Which is why you're commenting here. --   Simanelix   (T|C) 05:41, 25 November 2025 (UTC)
Thank you for pointing this out. Niknal (talk) 13:15, 26 November 2025 (UTC)
Wow, this is really subtle. Amazing result! Thank you very much for doing this. Melwin22 (talk) 17:53, 26 November 2025 (UTC)
Now I just need to improve the wiki calculator. --   Simanelix   (T|C) 20:31, 26 November 2025 (UTC)
Does this number include non-dyed? TheLazyDog (talk) 04:02, 22 February 2026 (UTC)
No. I think the game treats undyed leather armor as a separate thing. Of course, you could theoretically dye leather armor to have the same color as undyed leather armor. Making two identical pieces of armor that are technically different. --   Simanelix   (T|C) 18:40, 22 February 2026 (UTC)
Wouldn't it be more reliable to calculate the number directly inside minecraft using redstone and commands? 82.48.92.76 09:01, 29 November 2025 (UTC)
Actually crafting each combination would be way slower than just applying the formula in some program and running it. --MinecraftExp123(talk|contribs) 10:00, 29 November 2025 (UTC)

Feedback (Tue, 22 Jul 2025 17:38:45 UTC)

[edit source]
Latest comment: 22 July 20252 comments2 people in discussion
Resolved

Please make the texture consistent with the texture change, I dont have the pngs of the textures so I am unable to do it myself

--FeedbackBot 17:38, 22 July 2025 (UTC)
Textures will not be replaced until the new textures are in a proper release version (sometime in September likely). People playing the game should be able to open the wiki and see what is currently in the game, not what the game will be like in a few months. For now the new textures can be found in the history section. - Harristic / Talk 👁 Image
17:40, 22 July 2025 (UTC)

Feedback (Mon, 28 Jul 2025 13:45:46 UTC)

[edit source]
Latest comment: 3 October 20253 comments3 people in discussion
Unresolved

In the "Dyeing Armor" section with the dye calculator, it would make more sense to have the armor render closer to the calculator for quicker and easier accessibility to see what the armor would look like in game. Otherwise, you have to look across the entire screen to see it, and also, it looks odd being all on its own. (This is a desktop oddity. For mobile, it looks okay)

--FeedbackBot 13:45, 28 July 2025 (UTC)
👁 Image
 Agree There is no reason to have it on the other side of the screen. It should be left aligned, obviously. -- Simanelix (T|C) 14:24, 28 July 2025 (UTC)
I'm not sure how to add this to the calculator. Can you add this feedback to Calculators/Armor_color? GeberWolf (talk) 20:08, 3 October 2025 (UTC)

Feedback (Fri, 03 Oct 2025 17:41:26 UTC)

[edit source]
Latest comment: 4 October 20254 comments3 people in discussion
Resolved

Shouldn't there be a data values section containing all the IDs of all the dyes? I noticed that it is only available on each dye's individual page.

--FeedbackBot 17:41, 3 October 2025 (UTC)
Not sure about the order, but I went ahead and added Dye#Data_values, will mark this as resolved GeberWolf (talk) 02:59, 4 October 2025 (UTC)
The order should probably be changed to match blocks like Wool#Data values. 👁 Image
NmF (talk) 03:01, 4 October 2025 (UTC)
Good call, I've updated it to match GeberWolf (talk) 04:13, 4 October 2025 (UTC)

Dye Algorithm in Python

[edit source]
Latest comment: 17 October 20251 comment1 person in discussion
import math
def hex_to_rgb(hex_string: str):
 r_hex = hex_string[1:3]
 g_hex = hex_string[3:5]
 b_hex = hex_string[5:7]
 return int(r_hex, 16), int(g_hex, 16), int(b_hex, 16)

def rgb_to_hex(rgb):
 return '#%02x%02x%02x' % rgb

def tformat(text):
 t = f""
 for i in text.replace(' ', ' G').replace('_', ' G').split('G'):
 t = f"{t}{i.capitalize()}"
 return t
totalRed = 0
totalGreen = 0
totalBlue = 0
totalMaximum = 0
numberOfColors = 0
codes = [
 "#F9FFFE",
 "#F9801D",
 "#C74EBD",
 "#3AB3DA",
 "#80C71F",
 "#F38BAA",
 "#474F52",
 "#9D9D97",
 "#169C9C",
 "#8932B8",
 "#3C44AA",
 "#835432",
 "#5E7C16",
 "#B02E26",
 "#1D1D21"
]
white = [0, "white"]
orange = [1, "orange"]
magenta = [2, "magenta"]
light_blue = [3, "light_blue"]
yellow = [4, "yellow"]
lime = [5, "lime"]
pink = [6, "pink"]
gray = [7, "gray"]
light_gray = [8, "light_gray"]
cyan = [9, "cyan"]
purple = [10, "purple"]
blue = [11, "blue"]
brown = [12, "brown"]
green = [13, "green"]
red = [14, "red"]
black = [15, "black"]
colors = [ light_blue, orange, white ]
for color in colors:
 colDict = {"redValue": hex_to_rgb(codes[color[0]])[0], "greenValue": hex_to_rgb(codes[color[0]])[1], "blueValue": hex_to_rgb(codes[color[0]])[2]}
 totalRed = totalRed + colDict["redValue"]
 totalGreen = totalGreen + colDict["greenValue"]
 totalBlue = totalBlue + colDict["blueValue"]
 totalMaximum = totalMaximum + max(max(colDict["greenValue"], colDict["greenValue"]), colDict["blueValue"])
 numberOfColors += 1

averageRed = math.floor(totalRed / numberOfColors)
averageGreen = math.floor(totalGreen / numberOfColors)
averageBlue = math.floor(totalBlue / numberOfColors)
averageMaximum = totalMaximum / numberOfColors

maximumOfAverage = max(max(averageRed, averageGreen), averageBlue)
alphaFactor = averageMaximum / maximumOfAverage

resultRed = math.floor(averageRed * alphaFactor)
resultGreen = math.floor(averageGreen * alphaFactor)
resultBlue = math.floor(averageBlue * alphaFactor)
print(f"RGB: {resultRed}, {resultGreen}, {resultBlue}")
print("Colors:")
for i in colors:
 print(f" - {tformat(i[1])}")

KD2Dtcl 09:54, 17 October 2025 (UTC)

Feedback (Thu, 23 Oct 2025 00:16:51 UTC)

[edit source]
Latest comment: 23 October 20252 comments2 people in discussion
Resolved

The Java Edition history section does not include images of black, brown, blue, or white dye after they were made into their own items in 1.14.

--FeedbackBot 00:16, 23 October 2025 (UTC)
Done. The original reasoning was that this change only affected a few dyes, so should belong in the individual dye pages, e.g. Blue Dye. However, I now think adding a new item should be significant enough to be here. --MinecraftExp123(talk|contribs) 02:08, 23 October 2025 (UTC)

Java Graph Image showing leather armor dyes

[edit source]
Latest comment: 28 January3 comments2 people in discussion

The dyes in this image need to be updated for the new dye textures from the copper age game drop. Georgego80 (talk) 20:54, 28 January 2026 (UTC)

The file has now been updated --Capopanzo (talk | contribs) 22:39, 28 January 2026 (UTC)
Thanks Georgego80 (talk) 22:41, 28 January 2026 (UTC)
Retrieved from "https://minecraft.wiki/w/Talk:Dye?oldid=3481517"

Navigation menu