Why does Minecraft keep adding new color formats?

  Рет қаралды 76,931

Gneiss Name

Gneiss Name

29 күн бұрын

1.20.6 added yet another format to display colors in Minecraft.
Discord Link: / discord
BisectHosting was gracious enough to provide us with the Minecraft server we use for the community. If you are in the market for a server then you can use my code gneiss to get 25% off the first month when using any of their gaming servers.
bisecthosting.com/gneiss

Пікірлер: 485
@duncanurquhart5278
@duncanurquhart5278 27 күн бұрын
wow, minecraft really is just like real life... a dozen competing color formats for no discernable reason
@lasercraft32
@lasercraft32 27 күн бұрын
lol accurate XD
@mgord9518
@mgord9518 27 күн бұрын
It actually makes sense in real life because there are tradeoffs for using various color formats, which may suit a specific application better. Most applications that use colors stick to one specific format. Makes zero sense in a game like Minecraft though, where the only point is to get color on screen. Should've just used hex RGBA for everything (since it's by far the most common representation) and have the named colors as a nicety.
@Jan12700
@Jan12700 27 күн бұрын
As always xkcd Comic 927: Standards
@Akniy
@Akniy 26 күн бұрын
There is an actual reason. RGB makes it easier for computers Whilst HSL and HSV make it easier for humans. There's CMYK for printers because RGB it's subractive and thus works for ink. Then there's the many attempts at a perceptual colour space because nobody has not figured how to create a perfect perceptual colour space. And then you have the different Gamut color formats because of evolving technology. You've got sRGB, then P3 after sRGB and then Rec 2020 after P3
@mtarek2005
@mtarek2005 26 күн бұрын
​@@mgord9518Minecraft has 3 or 4 different formats for position in its code which is weird
@iloveflareon
@iloveflareon 27 күн бұрын
that is a very strange thing for mojang to do. at some point there will have to be another 'great flattening'-type update where things like this get fixed (1.22, maybe?).
@ignore2466
@ignore2466 27 күн бұрын
If we're really lucky, an dev might see this video and bring it up. Since they've done the entire NBT rework, and we're in pre-releases for 1.21 now, we might expect to see this in 1.21.1 :)
@the_luna_lily6234
@the_luna_lily6234 27 күн бұрын
it seems like thats what they are trying to do with 1.20.5 with the datapack changes (They have to do changes like this in one go, as even smaller things would break datapacks, so might as well put all the changes that break datapacks into 1 update, so datapack creators only need to remake it once) But since they havent done it with colours, i assume we got to wait for the next big datapack update, which could be ages away
@soomuchlag2038
@soomuchlag2038 27 күн бұрын
Wekl technically you can change the color of maps I guess
@ignore2466
@ignore2466 26 күн бұрын
@@the_luna_lily6234 When I see videos like Gneiss' content, I always hope and pray that devs from that game are watching too. This very well might be something they're not aware (enough) of.
@Tylorean
@Tylorean 26 күн бұрын
Ten bucks that bug report is gonna be „won’t fix“
@Beefmanington
@Beefmanington 27 күн бұрын
That anole got so excited 💀
@gneissname
@gneissname 27 күн бұрын
I was cracking up watching him. the tail just gets more and more out of control.
@robinsparrow1618
@robinsparrow1618 26 күн бұрын
i love it!
@dwarian5252
@dwarian5252 26 күн бұрын
@@gneissname I think the tail spins faster and faster to confuse the fly in some way. Letting the anole get close enough to strike the fly without flying away.
@zacharyevans8489
@zacharyevans8489 26 күн бұрын
@@dwarian5252 This is what I was thinking too, by slowly increasing the tail speed the fly gets used to the rapid movements and is no longer afraid of the Anole moving to eat it.
@erdmannelchen8829
@erdmannelchen8829 25 күн бұрын
@@gneissname I imagined the sound of its tail tip whipping against the rock lol.
@tortoise-chan
@tortoise-chan 27 күн бұрын
Not sure if this is relevant since beacon colors aren't part of the block (so can't / don't need to be defined in commands), but I figured I'd chime in. Funnily enough, beacons also use a completely different system. It's similar to leather armor, in that each successive stained glass block averages its RGB values with a "running total," but it's not exactly the same system as dying leather armor (which has some extra processing that tends to produce lighter and more saturated colors).
@gneissname
@gneissname 27 күн бұрын
I really wish beacons were able to the summoned or manipulated by the player somehow, besides the normal way.
@random832
@random832 27 күн бұрын
The main difference between armor and beacons is that beacons blend the new color 50% with the old one each time, whereas with leather if you craft an armor with more than one dye it'll blend all the colors [including the armor's existing color if it had one] together evenly. Like with a beacon if you have red, green, blue blocks it'll go red first, then (red+green)/2, then ((red+green)/2+blue)/2, whereas if you dye armor with all three dyes it'll go (red+green+blue)/3
@tortoise-chan
@tortoise-chan 27 күн бұрын
@random832 according to the wiki, armor dying also scales each color value by a 'gain factor,' which is computed as the [average of the maxima] / [maximum of the averages]. I don't know the color theory behind why.
@random832
@random832 27 күн бұрын
@@tortoise-chan Ah, yeah, I'd missed that part because all the variables are named weirdly in the decompiled code
@cinnamoncat8950
@cinnamoncat8950 26 күн бұрын
oh hey i recently watched some videos about beacon colors by @squibble111 they remade their first beacon color video cause it was incorrect
@Lookerman
@Lookerman 27 күн бұрын
Him pulling up all the coloured amor stands and it slowing the game was sudden, but wow it really is alot.
@Pogoed
@Pogoed 27 күн бұрын
well if it was every RGB colour then his computer would most likely freeze.
@candy6852
@candy6852 26 күн бұрын
@@Pogoed armor stands are entities. You can use them crash servers 💀
@simonwillover4175
@simonwillover4175 26 күн бұрын
Bro's got a nice PC, bc desmos just won't put up w/ that, it's only redering dots, not 3D models.
@tsawy6
@tsawy6 25 күн бұрын
In case you're not aware, he was not by any means understating when he said he wasn't using all of them. There are 5.7 million makeable just in the game.
@simonwillover4175
@simonwillover4175 25 күн бұрын
@@tsawy6 ?! Where did you get that number from???
@error-teapot-418
@error-teapot-418 27 күн бұрын
I believe the 16 color choices descend from the 16 colors IBM PCs could use when they first started supporting color, those colors became ubiquitous for text based interfaces. You can find more info here: en.m.wikipedia.org/wiki/Color_Graphics_Adapter#With_an_RGBI_monitor
@ThreeEy
@ThreeEy 27 күн бұрын
they indeed do, except for gold (and another color iirc)
@rogerwilco2
@rogerwilco2 26 күн бұрын
But why are there two different variants in Minecraft then? Why have both Gold and Orange? Why is Dark Grey Grey and Grey Light Grey?
@Stettafire
@Stettafire 26 күн бұрын
Yes, but this doesn't really apply to modern programming languages, which support hexadecimal colour codes.
@RK-wz4cc
@RK-wz4cc 26 күн бұрын
java color is those colors
@chnhakk
@chnhakk 26 күн бұрын
I bet it's because notch wanted the wools metadata to be a whole number.
@apollo4950
@apollo4950 27 күн бұрын
There's a 7th format, technically. Recent code additions mean we can get a peek at some of the fields that data-driven blocks will have. Gravel and sand blocks both have a "falling_dust_color" field which is an ARGB string (e.g. gravel's is "#FF807C7B"). Edit 1: Biomes use the leather armor format for grass/water colors. Guess this is what happens when legacy code is everywhere :P Edit 2: Oh yeah, I forgot about the 8th format: map colors. Map colors are a mess of legacy code, and we're actually very close to running out of them (we have 2-3 slots left iirc)
@nixel1324
@nixel1324 26 күн бұрын
@@apollo4950 This feels like IPv4 all over again, where I only learn it's running out when we've already almost run out.
@HolarMusic
@HolarMusic 26 күн бұрын
i wish they didn't go with 8-bit hex rgb
@colevilleproductions
@colevilleproductions 26 күн бұрын
are data driven blocks really coming?? I thought that was just a wonderful fairy tale
@apollo4950
@apollo4950 25 күн бұрын
@@colevilleproductions They're being worked on, yeah. Still a long way to go in the backend (lots of networking changes + item groups and stats need to be data-driven), but progress is happening.
@hannah42069
@hannah42069 23 күн бұрын
@@HolarMusic why would you need more?
@nixnox4852
@nixnox4852 27 күн бұрын
This sent me off into a rabbit hole on why the Anole was wagging it's tail. Apparently they do this for a few reasons (predator evasion, aggression towards competitors, stress, mate attraction, and hunting), but in this case of hunting, the term involved is likely “caudal luring" or "caudal distraction”. The paper "Caudal Movements in Western Fence Lizards (Sceloporus occidentalis) Prior to Attempted Prey Capture" notes this behavior, but is uncertain of what function it actually performs. I've seen a few other videos of Anoles doing this that are also going after flies.
@SuperCityscan
@SuperCityscan 26 күн бұрын
I thought it did it to overload the visual sensory part of the brain of that fly
@exotic-gem
@exotic-gem 26 күн бұрын
Minecraft’s internal data formats are insane. There are at least six ways to store coordinates (and I don’t mean different precision) The warden stores its animation data in its “brain”, which was supposed to be for villager memories. No other entity saves its animation data, so I don’t even know why it does this. Even the casing has no consistency. The variables names are a random mix of snake_case, camelCase, UpperCamelCase, Upper_Snake_Case, and I think I’ve even seen a bit of SCREAMING_CASE here and there…
@exotic-gem
@exotic-gem 26 күн бұрын
More detail : coordinates are sometimes stored as an array of three (unlabeled) numbers. They can also be stored as a compound tag, with names. They are also stored with the same name adding a suffix, like “positionX” “positionY” and “positionZ” These three formats exist both in 2 and 3 coordinate variants, for a total of 6 different possibilities before accounting for precision. If you add precision, coordinates can be ints, longs, floats or doubles. Therefore, in NBT alone, there are at least 24 ways to store coordinates.
@mystic-malevolence
@mystic-malevolence 26 күн бұрын
And structure blocks were changed to not allow uppercase, forcing me to use snake_case instead of camelCase I know this is tangential I just wanted to complain
@apollo4950
@apollo4950 26 күн бұрын
Correction on the brain info: Most post-1.14 entities use the brain system for storing non-permanent information (such as cooldowns). Breezes, Piglins, Piglin Brutes, Hoglins, Wardens, Allays, Armadillos, Axolotls, Camels, Frogs, Goats, Sniffers, and Tadpoles all use them. Casing is a mess due to so many different people working on the game over the years, but more recently there has been a push to move to snake_case. Pretty much all new fields are in snake case and everything related to the item format was converted to using it when item components were added. Entities will likely also be unified under snake case once entity components exist.
@MattTOB618
@MattTOB618 17 күн бұрын
No wonder why it's so hard for them to add anything into the game; they're working with a foundation of broken glass and duct tape! (To clarify: I'm being sympathetic.)
@finian2
@finian2 16 күн бұрын
'tis the side effects of an indie game with no plans of becoming a AAA game, suddenly inflating with no concrete code guidelines.
@real_Clone_Gordon_Freeman
@real_Clone_Gordon_Freeman 27 күн бұрын
This channel reminds me so much of SethBling videos from back in the day
@Sollace
@Sollace 26 күн бұрын
Must be the armor stands
@sam007mac
@sam007mac 27 күн бұрын
Hey Gneiss, a quick command tip: if you want to point at text but not have the block outline show (3:42), you can set the block_interaction_range attribute to 0
@gneissname
@gneissname 26 күн бұрын
Hey that is a great tip! It has bothered me in the past and I would just back out of range. I considered converting them all to blocks entities here so they don’t have it.
@random832
@random832 27 күн бұрын
The alternate set of 16 color names are the chat formatting colors, they're the ones with the old § codes, and used to be the only colors that could be used for text components, until 1.16 the support for full hexadecimal color was added. Their hex values are also much simpler, mostly combinations of 00, aa, and 55. The signed integer is really annoying, it's basically the raw conversion of the hex to a 32 bit value - usually negative since alpha is usually FF, and it shows up a lot in the decompiled output when modding too. Modding also has to deal with ABGR/RGBA colors too for certain purposes (the normal representation is ARGB but a few things like texture image data use the other format). And some things in modding you have to use a Vec3 or Vec4 with floats between 0 and 1 for the R/G/B/A values. There are three color values internally associated with each dye color, the "diffuse texture color", the firework color, and the text color [used for dyed signs]. The diffuse texture color is the one used for both armor and for beacon beams, even though those are blended differently when you mix them together. It's also used for sheep, though the sheep color is darkened by 75% [except for white, which has a different hardcoded value] before mixing with the texture. And then there's the map colors. There are 62 different map colors, and each one also has four different brightnesses used for showing topographic variation on maps.
@griffinrupe
@griffinrupe 27 күн бұрын
I love this kind of thing because you just know this could only ever happen in a game with as long of a development as Minecraft. Like entirely different teams of people could've implemented each of these color systems and they probably thought nothing of which color space they should use. I'm more surprised by the more recent additions like the glowing effect not being more standardized, but dyed leather armor has been around for *checks notes* twelve years?? I don't think I've dyed leather armor once in a survival world in the entire twelve years it's been around lmao
@gunkwizardry
@gunkwizardry 26 күн бұрын
neither have i! it's a shame too, because it's a cool mechanic but there's no incentive to use it outside of server-side stuff.
@avematthew
@avematthew 27 күн бұрын
When those 16 colour sets didn't match it threw me for a loop so bad. I guess the main lesson I have to take away from this is that coordination is hard. For context, even in a team of two people we both ended up writing different code to format addresses. The same address field. We were working like 15 feet apart. So, this doesn't surprise me, but it's a good lesson.
@khakers2.099
@khakers2.099 27 күн бұрын
Especially when done over the course of a decade plus of time and a dramatically changing codebase
@rogerwilco2
@rogerwilco2 26 күн бұрын
A real software engineer would ask themselves "have we done this before somewhere else in the code". I would actively check for consistency and coordinate with my colleagues on such things. We also have agreements within the office that everything is coded in SI units for example. I see this as a form of professionalism.
@nettalie4435
@nettalie4435 26 күн бұрын
The one thing I don't get is why basically everything uses a different colour format If it was two or three different formats I could definitely understand, it's really easy to go ahead and implement something a certain way without thinking too much about it even though a different implementation already exists and would work just fine. But this isn't a case of just two or three different implementations. Almost everything works differently from one another, which means we either have a weirdly extreme case of lacking coordination on our hands (possibly due to lacking documentation? Who knows), or (the less likely option) for some reason they thought using a different format for nearly every instance of colouring would be better. Somehow. Or it's the secret third option and we're all being played like fools.
@Stettafire
@Stettafire 26 күн бұрын
​@@rogerwilco2Then product comes along and says doing it the original way is too expensive and would take too long, do you're stuck using some newfangled system. As a software engineer, you must be aware of the limitations of working in a corporate environment. Coding at home is not the same beast as working for a major company.
@williamdrum9899
@williamdrum9899 26 күн бұрын
"Big endian or little endian?"
@plighting_engineerd
@plighting_engineerd 27 күн бұрын
Yay, another ✨colors ✨video!
@tiggerbiggo
@tiggerbiggo 26 күн бұрын
This is a bit long, and it's **mostly pure speculation**, but it attempts to describe why this sort of stuff can happen in big software, not just games. If the same dev had been tasked with all the colour related tasks and had complete control over how they actually accomplish that, we probably would have gotten a standard format for colour, but picture this: Minecraft used to have only the 16 colours, and they were accessed only by block IDs, back before blocks all had unique names like minecraft:stone You're a developer who has been tasked with adding one of these colour systems. I think leather armor was first, and they designed that so it would be usable in game with dye items. So now you need to write code that takes the current colour of an armor piece, and mixes it with the dye's colour. You could store R, G and B separately, or store a hex code as a string. There's many ways you could do this, and all we have now is the 16 base colours accessed by an ID, which means we need to **make up** something entirely new. The thinking probably went like this; "The player isn't going to see this value since they will just dye these, so why store it in a hex string and have to convert it back and forth? If I store them as a single 32 bit integer, I can use bitwise operations to do the mixing on every colour at once, and just store the raw number. No need to convert to / from hex or store multiple values" (I don't know if this is why, but replace this with whatever reason sounds good to you) So armor works like that now. To change it would mean a rewrite of the code for storing and mixing those colours, and also writing code to convert old save files, since they are all storing it in the numeric format. Some time passes, players get used to armor dyeing. Let's say the boss bar / titles came next. So now you need to write code to allow a command to show a title / boss bar with a specific colour. You don't want players to have to work out the number like they do with the dyes, since at least with dyes there's no expectation that you interact with them via commands, but we're adding an explicit way to choose colour via a command so it needs to be sensible to interact with it. So they make it a bit friendlier. Some designer somewhere says that they don't like the old "Green" colour, or something about the way those old colours are named doesn't fit with a focus group (I don't agree with this imaginary reason, but the point is manager influence may have played a role in some cases). So they make a new list of colours, and allow you to use rgb as well. So titles work like that now. To change it would mean a rewrite of the code for storing and displaying titles, and also breaking backwards compatibility for old command block setups which would no longer work with the new colour format. This cycle repeats because of the scale of the existing code, lack of freedom to change it due to the locked in nature of both working in a corporate environment, and having to make sure anything you change doesn't break too much of what players have made. I'm not saying they shouldn't have maybe thought a bit further ahead, but we all know that minecraft doesn't have the smoothest history when it comes to how it has been managed. This is where I did a bit of a dive into the wiki and discovered the true scale of just how many dynamic colours minecraft actually has: * Biome colours (and the transition between them) use an image as the texture to define what colours to use, but some are hardcoded and don't use these images * Tree leaves (and other foliage) are controlled by their species as well as their biome, the block texture has that colour applied afterwards, the texture is grey. * Water, both in cauldrons and in the world, also determined by biome * Some specific blocks have a hardcoded colour despite falling into one of the above categories, nobody knows why * Sheep colours look mostly like their dyes, but they also use a completely different set of colours which are similar but slightly different to the dyes * Banners, Beacon beams, Wolf / Cat collars, and End gateway beams all use dye colours (end gateway only uses "Magenta" and "Purple") * The world border has its own colours which don't match any of the dyes So the fun doesn't stop at just the ones you can access via commands! This isn't a completely exhaustive list of reasons why minecraft colours are the way they are, it's meant to be my general thoughts when I see stuff like this. Layers upon layers upon layers of spaghetti weaving in and out, and it ends up being easier to slap on another blob of code that does the same thing again, than untangle the mess and do it properly. Also your manager is on your back about it and if you do it properly you'll be told you're wasting time.
@Stettafire
@Stettafire 26 күн бұрын
Best comment
@photophone5574
@photophone5574 27 күн бұрын
3:19 I know this would be an absurd amount of work, but I really want to see an armor in between every two sets of armor.
@gneissname
@gneissname 26 күн бұрын
I think my computer would have exploded
@mattidragon835
@mattidragon835 27 күн бұрын
There's quite good reasoning for most of these. The underlying rendering system of minecraft uses 0-1 colors, but those are quite inefficient to store (4 * 32 bits). Because of this minecraft often packs colors into a 0xAARRGGBB format (consuming only 32 bits). In some places minecraft force sets the top byte of 0xff meaning that your specified alpha is ignored. Because java only has signed integers this gets converted into decimal as signed integers for storage. My guess is that they decided to use 0-1 for particles because that's how the old (very janky) way of specifying them worked. The 16 named colors used in most places are minecrafts text colors. They have been in the game since the notch days (notch made quite a few questionable choices in the code) and probably differ from the dye colors because some of them don't look good on text. Rgb color for text is a newer feature and as such not supported quite everywhere. If you have any questions, feel free to ask.
@Soraphis91
@Soraphis91 26 күн бұрын
feels still like a questionable design choice to make the players enter the number as a decimal number in some places instead of straight up RGB. Also having one place with RGBA and another with ARGB... Especially regarding the commands these conversions to the internally used Color object should be done by the game, not by the player.
@Stettafire
@Stettafire 26 күн бұрын
Best comment. The comments about "lazy Devs" when people don't understand the technical limitations of working with legacy code totally pisses me off.
@dedodododedadada5478
@dedodododedadada5478 26 күн бұрын
​@@Soraphis91Entity NBT isn't supposed to be user-friendly, Mojang just lets players use it in commands because it doesn't break anything. It's primarily used to store the data in save files, and it makes the most sense to store color as a decimal number.
@VirtualScallop
@VirtualScallop 26 күн бұрын
Not to mention, isn't dyed armor also relatively ancient? It may not have been the Notch Days(TM), but I started playing in 1.1, and I remember leather armor being dyeable starting... 1.4 (Pretty Scary Update)? Which would be late 2012. Nearly 12 years ago.
@thezipcreator
@thezipcreator 26 күн бұрын
@@dedodododedadada5478 I mean I wouldn't see the issue of allowing hex values in commands; like why not let players type 0xFF8000FF or something into a command, and then the parser can turn that into an int32 the same way it does with decimal
@matthewparker9276
@matthewparker9276 27 күн бұрын
Some time in the future they'll probably introduce a data driven "color" component with different ways of defining it like the 16 dye colours, hex, argb, etc.
@layla.meowes
@layla.meowes 26 күн бұрын
The reason: Mojang doesn't have color codecs, so each codec just does its own thing when converting a Java object to SNBT, as these commands were all added years apart. Basically, tech debt.
@BakeBakePi
@BakeBakePi 27 күн бұрын
And there's also the formatting codes with the section sign (§), which can be used in written books and in some text files for things like resource pack names! Great video!
@Katniss218
@Katniss218 26 күн бұрын
those are the same as the named chat colors
@griffinwolf5704
@griffinwolf5704 27 күн бұрын
Nice little clip of the anole
@joeking3181
@joeking3181 27 күн бұрын
I mean, I feel like that's just the nature of making a game over the years. One developer might decide to use a certain color format as that's what they are most familiar or comfortable with, then another dev might come along and maybe doesn't like that format, so decides to use their own, but it may take more work to remove or change the old format used on certain things, or maybe they just forget they had a color format set elsewhere, or maybe they never even worked on that part of the game. Even back in the day you had them changing "Cotton" to "Wool" and changing the color palette.
@Ghorda9
@Ghorda9 27 күн бұрын
this is really just unique to minecraft and MMOs, any studio worth their salt would stick to preexisting formats outlined in the GDD or just leave the game alone and move onto something else.
@pleasestopsubscribingtomyc3360
@pleasestopsubscribingtomyc3360 27 күн бұрын
cloth
@nikkiofthevalley
@nikkiofthevalley 27 күн бұрын
​@@Ghorda9There are no GDD colors for this, none of these things were originally supposed to be in the game. It was originally supposed to be a simple caving & crafting survival game, hence the name.
@TobiasHarms
@TobiasHarms 26 күн бұрын
Still by now, as in the last decade, there should be a lead developer or architect who signs off on planned changes and/or doing code reviews.
@joeking3181
@joeking3181 26 күн бұрын
@@TobiasHarms That’s true, but then you also gave them coding two separate games to be as similar to each other as possible which adds an additional challenge. I’m sure they have some checks and balances when it comes to making sure things are moving in the direction they want, but they also have a quota to fill now since the game is so much bigger and not just a couple guys coding this game in their basements. They can’t put too much into any one thing or they won’t meet their set deadlines.
@ack7
@ack7 27 күн бұрын
That anole looks so cute 10/10 best part of the video
@Mikemk_
@Mikemk_ 27 күн бұрын
The integers look like remnants of pre-nbt data values. RGB as an unsigned integer and ARGB as a signed integer are actually the same if the game ignores the top eight bits.
@kitlith
@kitlith 26 күн бұрын
They could (and probably are) both 32 bit signed integers, but since one doesn't have alpha, it doesn't set the most significant bit which makes it negative. (was gonna write my own comment to the effect, but went looking for someone else's first)
@Howzieky
@Howzieky 27 күн бұрын
This is a really interesting video, and it's one of my favorite kinds. The only request i have though is to use a larger GUI scale in the future. This scale is great if you have a large monitor and can get good resolution, but if you've got bad Internet or you're watching on a phone, it's a bit hard to see. I may just be going blind though. Either way, great video! It's really weird that Minecraft is like this
@gneissname
@gneissname 27 күн бұрын
thanks, I thought the same thing when i was editing but it was too late at that point :/
@water1705
@water1705 27 күн бұрын
the kind of formatting I'm expecting from minecraft
@ReddStrider
@ReddStrider 27 күн бұрын
iirc the team colors are the command lines colors
@TheUnlocked
@TheUnlocked 27 күн бұрын
The leather armor color format is probably also two's complement but it's only using the lower 24 bits of a 32-bit integer, so it looks the same as an unsigned int. For both that and the background color it's almost certainly just a straight reinterpretation of the hex code in binary to a 32-bit signed int.
@falkreon
@falkreon 2 күн бұрын
The hex code is one of minecraft's many representations of the actual 32-bit integer color-with-alpha that it uses everywhere, yes. It's only even signed because Java doesn't have an unsigned 32-bit integer type.
@merosii
@merosii 26 күн бұрын
THANK YOU THIS HAS BEEN BUGGING ME for so LONG. It’s such a hard detail to describe to others and you describe it so well
@LarsDonner
@LarsDonner 27 күн бұрын
For the float one they should have used pre-multiplied alpha. Not just because it would cause even more confusion but also because it's the superior format.
@META_Tommy
@META_Tommy 26 күн бұрын
Fun fact: display entities sometimes use radians and sometimes use degrees and it’s really annoying
@cerulity32k
@cerulity32k 26 күн бұрын
1:12 These colors are ANSI colors, which are colors available on terminals that meet ANSI's terminal formatting standard. Nowadays, terminals on desktop environments support all of 24-bit RGB (Truecolor), however those 16 ANSI colors are often used past terminals.
@Kellerberger128
@Kellerberger128 18 күн бұрын
Funfact: The ANSI colors were represented by just 4 bits in the past and probably still today. With a bit for R(ed), G(reen), B(lue) and I(ntensity).
@JavaJumper
@JavaJumper 27 күн бұрын
Some technical info. For some reason in Minecraft you can pass any information in particle packets. And any type of particle can specify information server will be able to send to client. For example, when I was making mod I specified radius and speed of particle effect and was able to modify this value using code that spawned particles or using /particle command Also hex and decimal number is just different representation of same number. So if you have like 0x00FFFF it is just representation of number 65535. It is used because it stores each color component in one byte of 4 byte integer and it is useful when you need to store lots of color info compactly (in images). What I think about named colors (not dye ones) is those are just legacy system, as those are just aliases for color values. There is literally just class Colors in Minecraft's code that just stores each color name and it's value. But I'm not sure, maybe it is used somewhere for a different reason
@jursamaj
@jursamaj 26 күн бұрын
All of that misses the point. There shouldn't be 6 distinct ways for humans to specify colors, unless they are alternates (like the one where you can choose between the name or the RGB hex value) that are all available in all contexts. Honestly, any modder using the names should have those as macros for the RGB. Then you can just have 1 format: hex ARGB. If somebody leaves off the A part, assume no transparency.
@Stettafire
@Stettafire 26 күн бұрын
Bingo. The guy about saying you "missed the point" ironically missed the point
@invalid_user_handle
@invalid_user_handle 27 күн бұрын
It seems like all of these color methods were developed in soluation and the thought of 'what if we used the same system as (other customizable color object)' never really came around. This does seem like something that needs standardizing, but some of these color methods (such as armor) have been in the game for years, meaning just switching Leather Armor to use RGB values instead of the decimal system would need some sort of interpreter to convert older saves, not to mention how many server plugins and gamemodes use colored armor for various things, those would need fixing too.
@kras_gk
@kras_gk 21 күн бұрын
dude you are amazing!! I have been trying to learn about the color perception on YT, but you are the most useful and clear! I wish i knew to add "minecraft" to my search request earlier haha xDD
@SchadenfreudeUY
@SchadenfreudeUY 27 күн бұрын
I forgot dyeing leather armor was a thing, I loved that mechanic... Like a decade or so ago when I played this religiously as a kid
@posterboymc
@posterboymc 27 күн бұрын
Speaking of names not matching when it comes to map item colors, white wool blocks renders as color 8 SNOW instead of 3 WOOL. I believe this is because there was only one wool in early development then wool became white wool when they added all the wool colors. It would make sense to change the render color of white wool at this time to compliment the other colors added.
@foryouphilanything
@foryouphilanything 26 күн бұрын
all your videos especially about colors are so interesting!!
@tryoxiss
@tryoxiss 26 күн бұрын
The colors for glow are ANSI colors, which is basically a standard to define how to Color text in a terminal. It used a 4-bit Color format (1 bit of each of red, green, and blue, and a fourth for if it should be bright or not). Because it’s very standard, it is likely that your theory is correct and they do exist in Java in the standard library or simillar.
@thomasmcdermott5723
@thomasmcdermott5723 27 күн бұрын
Love the content as always Gneiss. Nice lizard video!
@cobaltmn5716
@cobaltmn5716 27 күн бұрын
The 16 color system is probably a result of minecraft's text command system. A lot of games (including minecraft) format text by inserting special characters like '§' into the text. this is why text data in games looks weird. when you see a line like "OK §NAME, that will be \$§0 for that §1, is that fine? $DIALOG_YESNO" every one of those strange sets of characters is a special text command that signals the game to either insert some text there, format it in some special way, or run some sort of script. minecraft speciffically uses the section sign ('§') followed by a one-letter code that specifies a specific format command.
@miroaja1951
@miroaja1951 27 күн бұрын
I believe you can use the named colors in any text color component like item lore, name and the tellraw command
@user-xsn5ozskwg
@user-xsn5ozskwg 27 күн бұрын
The armour dyeing is so crazy. Like, I can fundamentally imagine why it works that way (all armour has unique data attached already, it's a worthy tradeoff to require 16 bytes instead of 1 to store colour given expected player behaviours, the same can't be said for wool or concrete), but when you compare it to the other systems for handling colour it's hard to imagine someone didn't take pause at the disparity and think about rectifying it.
@synt4x505
@synt4x505 26 күн бұрын
I guess the reason why these different formats exist has to do with in what kind of data structure they're embedded: The named colors (which have nothing to do with Java itself, they're probably based on the VGA/EGA colors which are used when the graphics output is running in text mode, or on the ANSI escape sequence 4-bit colors) are used in basic commands and JSON components. Named colors just make the commands easier to use. They're also used in the old colored text format using the `§` notation. Also the glowing effect is based on the team color, which is used for the player's name, so it is also a text color and thus a named color. The hexadecimal colors are always found within JSON components. It's just common practice to denote colors in hexadecimal when styling text (e.g. in HTML/CSS). The integer and floating-point formats on the other hand are used within NBT tags. I'd assume that particles use the floating-point variant so that you can easily control each channel and create effects with commands. Normalized floating-point values are just a standard way of representing colors in graphics APIs like OpenGL. And the ARGB and RGB integer formats are not really different from each other: both formats are signed 32-bit integers, it's just that the RGB variant is implicitly opaque. They both use the same conversion rules for converting from hexadecimal to decimal: If the value is larger than the maximum value of a signed 32-bit integer (2^31-1), flip all bits, add one, and put a `-` in front (2's complement). These (probably) don't use hexadecimal formats because of the way NBT data is (de)serialized, and always converting the hexadecimal string to its integer representation would just be bad performance-wise, especially if you have a lot of such objects. Also it'd be annoying to add this single exception for colors into the code while everything else works uniformly. Some variants just don't support alpha channels because it wouldn't make sense to use them there (e.g. with leather armor). It also kind of makes sense why the particles are in RGBA format and the text etc. in ARGB: when you don't want an alpha channel, you can just copy and paste the RGB variant and it'll still work as intended. 0xABCDEF in RGB is still 0xABCDEF in ARGB. {0.0, 0.5, 1.0} in RGB is still {0.0, 0.5, 1.0} in RGBA (assuming an implicit alpha channel). It might be a bit confusing at first, but I think most of these formats are perfectly reasonable for their use case.
@qfurgie
@qfurgie 18 күн бұрын
Java programmer here, the default Color library in Java consists of the following: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow. So neither list, but closest to the wool colors.
@falkreon
@falkreon 2 күн бұрын
the game does not touch those color constants, because doing so would fire up AWT's Toolkit class which would crash macs running Minecraft. Those colors have nothing to do with the names Minecraft uses.
@sinom
@sinom 26 күн бұрын
The two taking ints looks like an oversight. In java and other langauges you can usually specify ints in a hex format, and the compiler than converts them to normal ints automatically. So maybe there you can use 0xFFFFFF or 0xFFFFFFFF for those instead of the signed integers?
@AaronTheGerman
@AaronTheGerman 26 күн бұрын
It looks to me like the text display background and leather armor both encode the color as a 32bit signed integer, but since the leather armor doesn't have the alpha channel you never see it wrap around into the negative numbers
@Agent_Matt_6
@Agent_Matt_6 15 күн бұрын
Now I find myself remembering a video I recently watched about rainbow beacons
@therealdia
@therealdia 23 күн бұрын
I believe the 16 colors for the glowing effect are the same as the standard ANSI color codes, which are still used in modern terminals. If that’s the case, then it wouldn’t be shocking for those colors to be derived directly from Java
@seandorr7564
@seandorr7564 27 күн бұрын
I love every single one of your videos. Thank you for all the hard work and love put into them!!
@MIllyMunky
@MIllyMunky 27 күн бұрын
How long does it take you to prepare a video like this? Everything is nicely (gneissly) formatted and the video always goes so smooth with all of the demonstrations.
@gneissname
@gneissname 27 күн бұрын
Thanks! For this one, I wrote the script at lunch Thursday, put the visuals together in a few hours yesterday then a few hours to record and edit it today. These shorter color videos are usually pretty quick to put together.
@BlueDavrial
@BlueDavrial 26 күн бұрын
I actually recently made a mod, ANC Indicators if anyone wishes to look it up, and in the process of that i had to do a lot of stuff with colors, specifically the block dye colors and the text colors. It's less notable than the weird hex vs decimal stuff you show going on in this video, but what was odd to me is that 0 of the Text Colors and Block Colors match, despite many sharing names. Block White is different than Text White. Text Gray is almost the same as Block Light Gray, while Text Dark Gray is darker than Block Gray (there is no Text Light Gray or Block Dark Gray)
@evidence2839
@evidence2839 26 күн бұрын
for the team colours, they're the ones you can do with § and text, like §2 → dark green in book and quills
@JurassicJordan
@JurassicJordan 26 күн бұрын
I forgot about the dye-able leather. I had thought they removed it since 1.12 but I’m glad it’s still here
@rosekennedy9744
@rosekennedy9744 27 күн бұрын
Dude that lizard goes so hard. You should post pictures or videos from hikes you go on if you do that often!! I’d love to see some real life geology applications
@gneissname
@gneissname 26 күн бұрын
Yeah, this was my 6th hike on this trail. I might make a video on the canyon sometime.
@juliand665
@juliand665 26 күн бұрын
To be clear, both RGB and ARGB hex values are signed 2's complement integers, it's just that the RGB ones' top bit is always 0 so they never turn negative.
@musclechicken9036
@musclechicken9036 26 күн бұрын
I was really happy that I got to see the little bonus at the end of the video (:
@alysoffoxdale
@alysoffoxdale 27 күн бұрын
Flippy tail! What a cutie! Meanwhile, I'mma guess what's up with the different color schemes is too many different programmers being too fond of their own coding preferences to match up with any existing scheme.
@jursamaj
@jursamaj 26 күн бұрын
And nobody reviewing their work and *insisting* on a standard.
@Stettafire
@Stettafire 26 күн бұрын
Nah, more like working with a legacy code base is a nightmare and there is always a time crunch
@alysoffoxdale
@alysoffoxdale 26 күн бұрын
@@Stettafire Those points are _always_ salient factors, yes!
@KubinoSK
@KubinoSK 26 күн бұрын
Just an addition to 1:00 - Glow color of only display entities can be changed to any rgb color. I don't know if it is possible to modify it through command blocks though
@su2so3
@su2so3 26 күн бұрын
Wow, this is unhinged, thanks for demonstrating all the formats! If I am not mistaken, the ARGB twos complement and integer are actually the same format -- set A to 0 in your ARGB two's complement calculator, and it should always give you the exact same result as the RGB integer. Going off memory, though, so if you try it, let me know if I'm right :P
@NotKnafo
@NotKnafo 27 күн бұрын
didnt talked about custom potion color which uses a similar format to leather armor color
@Solid_Fuel
@Solid_Fuel 26 күн бұрын
and you have maps: with each pixel on a map uses the average (?) color of the block and whether it is lower or higher in elevation than the block north of it
@goat.95
@goat.95 26 күн бұрын
For those who are curious, colour values from 0 - 1 is just openGL's native format for representing colour. As for why mojang doesnt convert it to rgb, who knows lol.
@Yackalips
@Yackalips 26 күн бұрын
yeah I noticed that too lol since ive been working with openGL. I have no idea why they wouldnt take a few more seconds and just divide by 255 on each so you can use rgb instead
@uropig
@uropig 27 күн бұрын
you can add unique team colors by nbt editing your save file
@StCost
@StCost 24 күн бұрын
That day I feel like using specific format I didn't forgot yet. As long as it works
@Bentroen_
@Bentroen_ 24 күн бұрын
Situation: There are six competing standards. - Six?! We need to develop one universal standard that covers all the use cases! Situation: There are seven competing standards.
@sirati9770
@sirati9770 24 күн бұрын
i think one reason is that in memory these numbers are indeed just one number, when they write the command they need to set setting for each argument on how that be processed from the human input into the internal state. the default for that is decimal numbers, so they just forgot to set that those arguments should be hex in the command. as for items they do not have a special way to say that a property is to be interpreted/displayed differently when interacting with the human, at least that was true in the old nbt way or storing things before tags. so for item those properties are just you setting the nbt manually and because it just knows this has to be a number the architecture does not allow to ask for that number in hex.
@radar12564
@radar12564 26 күн бұрын
I love Gneiss so much. I’d honestly LOVE to see a “Geology of Chicago” video at some point if that’s in your wheelhouse!
@Adowrath
@Adowrath 24 күн бұрын
One thing I can chime in with: The reason wool colors are limited to 16 is because that's what the original metadata system supported: 1 nibble, aka. 4 bits, aka. 16 variants per block. An idea I have why the text chat colors are usually limited to 16 as well (though I don't know why they chose different ones) is that they can (though not in-game) be written by prefixing with §x, with x ranging from 0-f. Again, they probably chose 16 to overlap with a hexadecimal integer, and so they could use separate ones like §r to reset, and l-o for bold/strikethrough/underline/italics (and §k for garbled text).
@Mulakulu
@Mulakulu 26 күн бұрын
I wish it was all ARGB and either the 16 team colors or the 16 dyes and you would be able to choose based on how exact you want to specify the color. Like if youre coloring a team or a bossbar, you can just use "aqua", but you could also use [1,0,0.6,0.8]. Maybe having the A in ARGB only be applicable with stuff that can be transparent. This would be 4 systems rather than 6, and you would be able to pick and choose which you feel like using
@CaptainBeebi
@CaptainBeebi 22 күн бұрын
So here's my best guesses based on my own experience with OpenGL: *Particles:* The RGB(A) 0.0-1.0 has to do with the way the effects are colored by OpenGL. Since we use normalized color values for vertex coloring, Minecraft's just trying to save a bit of processing time by avoiding the need to calculate (1/255)*V. This approach saves 108-264* compute cycles per particle, which doesn't seem like a whole lot but it'll add up over time. IIRC the reason Dust particles don't have use alpha value while Effect particles do is because Dust particles don't have a way to alter their transparency in the game code. *Glow Colors:* These may be locked to those 16 entries to match the color range for chat messages. The reason they're different from the dyes is because they're visibly distinct to people with colorblindness, while the dye colors are much harder to differentiate. *Text Display:* Likely uses hexcode for ease of use, since you can just copy-paste 6 characters from Photoshop or Paletton instead of 0.0-1.0 or 0-255 for each channel. Since it only needs to do the (1/255)*V calculations when initializing the entity, the tradeoff of readability vs processing time is much better than for particle generators. As for why the alpha transparency is 0-255, hexcodes don't include the alpha channel and people are better at picking random integers than random decimals. *Text Background:* I think Mojang just hates you guys, because I can't think of any reason they'd have you convert the hexcode to an integer _before_ entering it into the command block. *Leather Armor:* is stored as an integer for space-saving purposes when saving the game. One 32-bit integer takes 4 bytes of data, while three 32-bit floats take up 12 bytes. And since they only need to do the (1/255)*V calculations on loading the game like the text entities, the time spent converting the integer to floats isn't that big a deal. _*Division is very slow, taking 30-60 compute cycles to perform a single operation. Multiplication is faster, but still takes ~6 compute cycles to perform a single operation. This seems like nothing, but when you're generating hundreds or thousands of particles each second, that adds up._
@rcoder01
@rcoder01 27 күн бұрын
The lizard thing at the end is very cute!
@jerrolkay4628
@jerrolkay4628 16 күн бұрын
At 2:11 I think it should have been noted that you don't need to put the dye on a piece of armor one craft at a time. For example, instead of dyeing the helmet red then combining the red helmet with orange dye to get the red-orange helmet you can put the red and orange dye in the crafting grid with the plain helmet and it will output the red-orange helmet.
@ziphhy
@ziphhy 27 күн бұрын
They should keep the color names for everything for the less advanced users and then for more advanced users they should have hex with an occasional alpha 0-255
@Gandhi_Physique
@Gandhi_Physique 26 күн бұрын
Cool lizard, and also cool flies too actually. I hate flies, but I like how the iridescent ones look.
@sirati9770
@sirati9770 24 күн бұрын
the 16 colours for formatting text in older versions as well as the team colours correspond to the 16 colours available in ansi terminals (and old standard for displaying coloured text on computers were having more than 16 colours would still overwork the cpu and gpu) in may-june 2009 when notch added coloured text messages and coloured wool for the first time, he just coded those 16 colours into the code. the colour for wools was only changed in 1.2 when notch decided to add dyes to the game and especially choco beans as one of the colours. so far no brown existed
@CaptainZark
@CaptainZark 26 күн бұрын
Theres only one reason I can think of for this. This sort of thing is a very common effect of the way minecraft is designed. Specifically it is designed piece by piece with no specific end goal or vision. Just whatever the developers think would be cool at the time. Usually by different teams who dont have a full understanding of all the games systems. Since they dont have some central design document or standards they just choose whatever system works best for whatever theyre designing, and probably dont even know that it conflicts with the way other mechanics work. Tldr: No central planning means devs just do what they think is best in the moment unaware its different from everything else.
@joeeeee256
@joeeeee256 26 күн бұрын
The 16 colours correspond with the 16 colours available in the Windows command prompt. I suspect it goes back much further than this, but it seems common to support these 16 colour names when not supporting any custom colours.
@jaykebird2go
@jaykebird2go 26 күн бұрын
I know that anole's tail going wild like that is for some kind of different reason, but it amused me so much since it reminds me of my dog wagging his tail wildly when he's excited about a treat!
@Zero-4793
@Zero-4793 23 күн бұрын
100% agree with this. i noticed this (or got angry at it) when i tried to summon leather. other than that ive really only had to deal with the old dust particle system
@Swagpion
@Swagpion 26 күн бұрын
3:16 last time I checked, you can mix the dyes for WAY more possibilities. Granted some colors would still be inpossible, but still.
@aabb-nx9ij
@aabb-nx9ij 26 күн бұрын
There is also another color format for books which uses the paragraph symbol (§) and has the same values as glowing, but is inputed differently (§0 for black, §a for green, §c for red, etc, ill try to reply with a link but youtube might hide it).
@aabb-nx9ij
@aabb-nx9ij 26 күн бұрын
youtube hides the comment with link :( you can google "minecraft book color codes"
@Banana_Fusion
@Banana_Fusion 12 күн бұрын
That tail went mad
@octonezd
@octonezd 24 күн бұрын
I think named colors are there to make game friendly for colorblind people - though I am not sure that minecraft has features for alternative palette
@NicoleZannis
@NicoleZannis 25 күн бұрын
(bio major with a love for herpetology) i think the lizard you saw is a spiny/fence lizard in the genus Sceloporus-- not sure about the specific species-- and not an anole. still super cute tho and i love its charge up attack :)
@Unkle_Genny
@Unkle_Genny 23 күн бұрын
1:15 I don’t know the specifics, but I can tell you that the first set of colors are also the palette used for chat text colors and sign text colors
@gdps8371
@gdps8371 26 күн бұрын
The reason why is 2 reasons in my opinion 1. Some of them have different purposes this doesn’t encompass all of them obviously but I think it does affect it partly 2. The overcomplicayed NBT system different command formats have different systems I think it’s changeable but just naturally changes because of the format TL;DR a they could make it consistent across 2-3 types but it initially made more sense/was easier for it to not be and there is no reason to change it
@sebastiangrau8409
@sebastiangrau8409 25 күн бұрын
It would be interesting to learn just what the leather armor color mixing mechanic actually does to determine which colors are obtainable and what is the optimal way to reach a certain color code using the fewest number of steps or least dyes.
@Yackalips
@Yackalips 26 күн бұрын
The reason why is uses this format is probably because thats how LWJGL (the framework minecraft java is built on) uses that format by default
@Gaston731r
@Gaston731r 27 күн бұрын
Can you make a video of the minecraft blocks in grayscale?
@E_T_31
@E_T_31 26 күн бұрын
I tried making a sand colored dust particle a while ago ... I had to give up because it was either way too bright or just complete RGB noise :(
@baccocraft
@baccocraft 26 күн бұрын
Yeah, this is super annoying and I kept noticing it when i was developing my colour picker mod. Another weird colour format you didn't mention is map_colour. It changes the colour of the scribbles on the filled_map texture. It uses hex value converted to decimal, like leather armour. But, the command syntax is different for some reason. For armour its: dyed_color={rgb:16711680} For maps its: map_color=16711680
@Solrex_the_Sun_King
@Solrex_the_Sun_King 26 күн бұрын
3:20 this seems like it's missing stuff, what this looks like to me is the 16 base dyes in the game, and you can draw a line from any node going towards any other node, or wherever you're at towards another node. I wanna see the web of what is possible in survival tbh.
@cheesybrik9073
@cheesybrik9073 27 күн бұрын
Bring up this issue on the bug tracker! It’ll take a while but they’ll most likely get around to it especially with them adding the whole component system they’ll want to bundle larger command changes together.
@DqwertyC
@DqwertyC 25 күн бұрын
It can't be done with commands, but there's also the beacon color, which is recolored with dyed stained glass, and different colors can be stacked. I'd assume it has a similar gamut to leather, but I don't really have any evidence to back that up.
@Griefo
@Griefo 26 күн бұрын
How do you display black text on the white background like you did at the end?
@ThatClotpoll
@ThatClotpoll 26 күн бұрын
The anole looks likr such a happy little guy :D
@PercyPanleo
@PercyPanleo 14 күн бұрын
With the team glow colors, that is the standard color set used in Linux and Unix terminals, so it probably is part of Java itself
@alecity4877
@alecity4877 27 күн бұрын
that was such a cute lizard at the end
I Coded a Minecraft Update in 7 Days
11:00
Whimzee
Рет қаралды 143 М.
Minecraft Education Edition’s Failures
23:08
Gneiss Name
Рет қаралды 656 М.
UFC Vegas 93 : Алмабаев VS Джонсон
02:01
Setanta Sports UFC
Рет қаралды 226 М.
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 64 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 8 МЛН
53 Features Minecraft NEEDS to Add in 1.22!
21:41
Dr. Bonks
Рет қаралды 74 М.
Can You Beat Minecraft From The Nether Roof?
17:13
EnderSkull
Рет қаралды 388 М.
10 Ancient Minecraft Modpacks You Forgot About
15:13
Paladin Ryan
Рет қаралды 243 М.
How does Minecraft ore compare to Earth
26:01
Gneiss Name
Рет қаралды 290 М.
It Turns Out, Minecraft Can Beat Itself
24:28
PippenFTS
Рет қаралды 1,1 МЛН
AI Builds in Creative Mode | Mindcraft
14:14
Emergent Garden
Рет қаралды 83 М.
I Added Infinite Crafting to Minecraft (with AI)
13:08
Blucubed
Рет қаралды 669 М.
A perceptual color space in Minecraft (Oklab)
15:38
Gneiss Name
Рет қаралды 158 М.
Will We Ever Run Out Of Redstone?
10:53
Purplers
Рет қаралды 1,5 МЛН
I Made Minecraft As Immersive As Possible Using Mods
10:15
AsianHalfSquat
Рет қаралды 533 М.
ВЫПАЛ НОВЫЙ БРАВЛЕР БЕРРИ В BRAWL STARS
14:25
Отмечай День Рождения WoT Blitz Вместе с Нами!
1:27:05
WoT Blitz Без Границ
Рет қаралды 156 М.