minecraft.wiki-mirror/wiki_backup/Tint.txt
2024-12-24 06:17:34 -05:00

186 lines
13 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{about|the rendering mechanic|items used to apply color to others|Dye|other uses}}
'''Colors''' are applied to several [[block]]s, [[item]]s and [[particle]]s in order to display a much wider array of possibilities than would be possible with a raw unmodified texture without the need for potentially millions of distinct files.
== Block and fluid colors ==
{{main|Block colors}}
=== Grass ===
{{for|the colors applied to these blocks in {{el|je}}|Block colors#Grass colors}}
{{for|the colors applied to these blocks in {{el|be}}|Block colors#Grass colors 2}}
The following blocks are counted as part of the "grass" group of blocks as of 1.19.3, and are accordingly colored:
*{{BlockLink|Grass Block}}
*{{BlockLink|Short Grass}}
*{{BlockLink|Tall Grass}}
*{{BlockLink|Fern}}
*{{BlockLink|Large Fern}}
*{{BlockLink|Potted Fern}}
*{{BlockLink|Sugar Cane}}
Grass colors are biome-dependent, and the colors used are usually picked from a dedicated grass colormap, with some exceptions.
The following removed blocks (many unintended) also utilized the grass colors (full lists of renders can be found [[Block colors/Removed blocks and biomes#Potted grass blocks, grass and green shrubs|here]] and [[Block colors/Removed blocks and biomes#Green shrubs|here]]):
*{{BlockLink|id=shrub-inv|Green Shrub}}
*{{BlockLink|id=potted shrub-inv|Java Edition removed blocks/Data variants#Incorrect blocks in flower pots|Potted Green Shrub}}
*{{BlockLink|Potted Grass|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
*{{BlockLink|Potted Grass Block|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
=== Foliage ===
{{for|the colors applied to these blocks in {{el|je}}|Block colors#Foliage colors}}
{{for|the colors applied to these blocks in {{el|be}}|Block colors#Foliage colors 2}}
The following blocks are counted as part of the "foliage" group of blocks as of 1.19.3, and are accordingly colored:
* {{BlockLink|Oak Leaves}}
* {{BlockLink|Jungle Leaves}}
* {{BlockLink|Acacia Leaves}}
* {{BlockLink|Dark Oak Leaves}}
* {{BlockLink|Mangrove Leaves}}
* {{BlockLink|Vines}}
Foliage colors are biome-dependent, and the colors used are usually picked from a dedicated foliage colormap, with some exceptions.
The following removed blocks (many unintended) also utilized the foliage colors (a full list of renders can be found [[Block colors/Removed blocks and biomes#Potted leaves and vines|here]]):
* {{BlockLink|Potted Oak Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Birch Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Spruce Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Jungle Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Acacia Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Dark Oak Leaves|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
* {{BlockLink|Potted Vines|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
=== Water ===
{{for|the colors applied to water in {{el|je}}|Block colors#Water colors}}
{{for|the colors applied to water in {{el|be}}|Block colors#Water colors 2}}
Water placed in the world is also subject to coloring. {{iN|JE}}, this also applies to cauldrons.
*{{BlockLink|Water}}
*{{BlockLink|Water Cauldron}}
Unlike grass and foliage, water colors are always predefined, and are never picked from a colormap, even though [[History of textures/Unused textures#watercolor.png|one used to exist]].
=== Stems ===
{{for|the colors applied to stems|Block colors#Stem colors}}
Unlike other crops, [[pumpkin stem]]s and [[melon stem]]s utilize a color system which applies a different color for each growth stage.
*{{BlockLink|Pumpkin Stem|link=Pumpkin Seeds}}
*{{BlockLink|Melon Stem|link=Melon Seeds}}
=== Redstone wire ===
{{for|the colors applied to redstone wire|Block colors#Redstone colors}}
[[Redstone wire]] uses a color system which colors the wire depending on its current power level. With no power, it appears as a very dark red, whereas it appears bright red at full power.
*{{BlockLink|Redstone Dust|Redstone Wire}}
=== Potion cauldrons ===
{{main|Effect colors}}{{Exclusive|Bedrock}}
Potions placed in cauldrons also use colors to represent the contained potion. {{info needed}}
=== Constant colors ===
{{for|a list of constant colors|Block colors#Constant colors}}
A small subclass of blocks use colors which do not change at all under any circumstances.
* {{BlockLink|Birch Leaves}}: {{Color|#80A755}}
* {{BlockLink|Spruce Leaves}}: {{Color|#619961}}
* {{BlockLink|Lily Pad}}: {{Color|#208030}}
* {{BlockLink|Attached Melon Stem}}: {{Color|#E0C71C}}
* {{BlockLink|Attached Pumpkin Stem}}: {{Color|#E0C71C}}
The following removed blocks (many unintended) also used a constant color (a full list of renders can be found [[Block colors/Removed blocks and biomes#Potted leaves and vines|here]]):
* {{BlockLink|Potted Lily Pad|link=Java Edition removed blocks/Data variants#Incorrect blocks in flower pots}}
== Items ==
{{main|Item colors}}
{{info needed section|leather armor, potions, filled maps, spawn eggs, firework stars, potion/tipped arrow effects, dyed leather armor and leather horse armor}}
== Entities ==
{{Main|Miscellaneous colors}}
{{info needed section|dyed sheep, dyed collars}}
=== Dyed sheep ===
Sheep colors do not seem to match dye colors or firework star colors directly one to one, they differ slightly.{{info needed}}
=== Wolf and cat collar ===
Both wolf and cat collars use the [[Dye#Color values|dye colors]] directly one to one.
=== Experience orbs ===
{{for|the colors applied to the world border|Miscellaneous colors#Experience orbs}}
[[Experience orb]] textures are mostly white, gray, and red; a gradient is applied afterward to make them green and yellow.
=== Other ===
==== Particles ====
{{info needed section|Create a full list of particles that actually use colors}}
Alongside potion particles, several other [[particle]]s are stored as gray textures with colors applied to them after the fact. Notable examples are the various dripping particles (water, lava, honey, crying obsidian, spore blossom), critical hit (which has a white texture but an orange color is later applied), and magic crit (same).
Note blocks also emit particles, whose base texture is gray, that change color through the spectrum.
Commands can be used to set the colors of some but not all particles.
==== Banners ====
Banners are colored according to default [[Dye#Color values|dye colors]].
==== Beacon Beam ====
Beacon beams are colored according to default [[Dye#Color values|dye colors]]. Without any stained class, it defaults to the color for white dye.
==== End gateway beam ====
{{for|the colors applied to end gateway beams|Miscellaneous colors#End Gateway beam}}
The [[end gateway]] creates a beam under certain circumstances which is colored different colors depending on why said beam is created.
==== Guardian beam ====
{{for|the colors applied to guardian beams|Miscellaneous colors#Guardian beam}}
When attacking, [[guardian]]s shoot a ranged beam which follows a gradient dependent on time.
==== World border ====
{{for|the colors applied to the world border|Miscellaneous colors#World border}}
The [[world border]] {{in|JE}} has several colors. A blue color is applied if the border is stationary. If expanding, the world border takes on a green hue. If the world border is shrinking, the world border turns red. In the Nether, the world border is always red no matter if it is expanding, stationary, or shrinking. The world border becomes more opaque the closer the player is to it, and more transparent if the player is further away.
== Biome colors ==
[[File:grasscolor.png|128px|thumb|grass.png]]
[[File:Template grass.png|128px|thumb|grass.png with all used pixels with respective temperature and downfall values.]]
[[File:foliage.png|128px|thumb|foliage.png]]
[[File:Template foliage.png|128px|thumb|foliage.png with all used pixels with respective temperature and downfall values.]]
[[File:Swamp foliage.png|128px|thumb|swamp_foliage.png in bedrock resource. All pixels colored {{color|#6A7039}}.]]
The temperature and downfall values of a [[biome]] are used when determining the colors of a selection of blocks: [[short grass]], [[grass block]]s, some [[leaves]], [[vines]], [[sugar cane]], [[pink petals]], and other features such as [[water]] and the sky. Blocks such as [[mossy cobblestone]], [[mossy stone bricks]], and the stems of [[flower]]s are not affected by biome coloration.<ref>{{bug|MC-128784|Stems of flowers and moss on mossy cobblestone/stone bricks unaffected by biome coloring|Invalid}}</ref>
Biome grass and foliage colors are selected from two 256×256 colormap images: grass.png and foliage.png. Both colormaps can be found in {{cd|assets\minecraft\textures\colormap}}{{only|JE|short=1}} or {{cd|textures\colormap}}.{{Only|BE|short=1}} The grass.png colormap sets the colors for the [[grass block]] top and overlay sides, grass, tall grass, fern, tall fern. Meanwhile, the foliage.png colormap sets the colors for oak, jungle, acacia, dark oak, and mangrove leaves.
Biome colormaps use a triangular gradient by default. However, only the colors in the lower-left half of the image are used, even though the upper-right side of foliage.png is colored. Furthermore, as shown in the template image to the left, a select few pixels are considered when the colormap is read by the game, and are determined by the code below.
The temperature and downfall values are used when determining the biome color to select from the colormap. Treating the bottom-right corner of the colormap as temperature = 0.0 and downfall = 0.0, the adjusted temperature increases to 1.0 along the X-axis, and the adjusted downfall increases to 1.0 along the Y-axis. The clamp limits the range of the temperature and downfall to 0.01.0. The clamped downfall value is then multiplied by the 0.01.0 adjusted temperature value, bringing its value to be inside the lower left triangle. Some biomes' ranges are shown in the template above; the multiplication makes all the line segments point toward the lower right corner.
At borders between or among biomes, the colors of the block and its eight{{verify|is this the default in Java, or is this outdated information due to the higher default value of Biome Blend? and are 3D neighbours taken into account?}} neighbors are computed and the average is used for the final block color.
{{IN|BE}}, biome colors are also visible on [[map]]s.<ref>{{bug|MC-130658}}</ref>
=== Hard-coded colors ===
Certain biome colors are hard-coded, which means they are locked into the ''Minecraft'' code and are not retrievable from any texture file. Thus, they cannot be modified without the use of [[mod]]s or [[shaders]].
==== Swamp color ====
Swamp temperature, which starts at 0.8, is not affected by [[altitude]]. Rather, a [https://en.wikipedia.org/wiki/Perlin_noise Perlin noise function] is used to gradually vary the temperature of the swamp. When this temperature goes below &minus;0.1, a lush green color is used ({{color|#4C763C}}); otherwise it is set to a sickly brown ({{color|#6A7039}}).
==== Dark forest color ====
The dark forest biomes' grass color is retrieved normally with the same temperature and rainfall values of regular forests, then [https://en.wikipedia.org/wiki/Mask_(computing) bit masked] with the number #FEFEFE, and averaged with a dark green color ({{color|#28340A}}) to produce the final color. In vanilla, the color therefore used is {{color|#507A32}}.
==== Badlands color ====
All badlands biomes' grass and foliage have hard-coded colors, which are two tan colors ({{color|#90814D}} and {{color|#9E814D}} respectively). These are not modifiable by grass.png and foliage.png, and are unaffected by temperature.
==== Cherry grove color ====
[[Cherry grove]]s use color value {{color|#B6DB61}} for its foliage and grass. This color is not modifiable by foliage.png and grass.png, and is unaffected by temperature.
==== Other colors ====
Several other biome colors are set into the game and currently require external tools in order to be changed. This includes blocks such as birch and spruce leaves and water (which have a hard-coded overlay set onto them), and other features such as the sky and fog.{{more info|what are the values of the sky color per biome, and what is the fog color per biome? check both java and bedrock}}
== History ==
{{info needed section|
*Assorted bugs to maybe document: {{bug|MC-222}}, {{bug|MC-418}}
*Sections for particles?}}
== References ==
{{reflist}}
== Navigation ==
{{Navbox gameplay}}
[[es:Color]]
[[ja:色調]]