22852nd poster gets a cookie (cookie thread (Part 7)) (Part 10)

I have a suggestion.

– isuggestnotmajoringinjournalism

3 Likes

Sorry hold on I have a better one

– isuggestforceSTEM

7 Likes

I wish i got forcestemmed :pensive:

5 Likes

i need stem assistance rn help

3 Likes

image

2 Likes

well now youre recruited

1 Like

What’s the problem?

1 Like
set all "total" variables to 0
set numberOfColors to 0
for each color:
 set totalRed to: totalRed + redValue
 set totalGreen to: totalGreen + greenValue
 set totalBlue to: totalBlue + blueValue
 set totalMaximum to: totalMaximum + (max of redValue, greenValue, blueValue)
 set numberOfColors to: numberOfColors + 1

set averageRed to: floor of (totalRed / numberOfColors)
set averageGreen to: floor of (totalGreen / numberOfColors)
set averageBlue to: floor of (totalBlue / numberOfColors)
set averageMaximum to: totalMaximum / numberOfColors

set maximumOfAverage to: max of (averageRed, averageGreen, averageBlue)
set alphaFactor (float) to: averageMaximum / maximumOfAverage

set resultRed to: floor of (averageRed * alphaFactor)
set resultGreen to: floor of (averageGreen * alphaFactor)
set resultBlue to: floor of (averageBlue * alphaFactor)

according to the wiki this is how minecraft dyes work. it causes numerous combinations to not be possible. i want to visualise this. my options are:

  • get all the possible combinations and just rog bruteforce that shit into some kind of color picker (i can do this, not happy about it)
  • establish the boundaries of the algorithm as some kind of fractal in 3 dimensional space and use this as a mask (what)
  • kill self

help me.my family is starving

5 Likes

What does color look like?
I’m imagining it’s, like, an array of objects with redValue, greenValue, and blueValue?

Are there any limitations on that array? That feels like the biggest sticking point here.

ok so. the dye operation has 0-8 dyes. they call this colors in the pseudo code because they hate you. there are 16 different predefined dyes. each can be used multiple times in one operation

1 Like

@Zugzwang

2 Likes

yeah originally i was just going to bother him over this but i saw the word stem in cookie and just decided to rant

1 Like

Are the dyes just mirrored versions of each other (same underlying values that’re swapped between redValue-greenValue-blueValue), or am I misunderstanding what they are?

Wait, I can Google this.
Be right back.

Ok, I’m understanding the issue.
Hm.

i am in hell

1 Like

well if youre in hell why would you be on fol instead of on fol

3 Likes

i am a famed Minecraft armorsmith btw (partial lie) i want to be able to dye armor without either freehanding or throwing a hex code at the wall and hoping the closest perceived distance isnt 10 years away. which is why i yearm for the visualisation

1 Like

The way I’m imagining this is a series of vectors in 3D space that we’re scaling by \left\lfloor\frac{totalMaximum}{maximumAverage} \right\rfloor.