Custom Colors - MehVahdJukaar/polytone GitHub Wiki
Custom Colors feature allows to change some hardcoded color values via a simple text file in your Resource Pack.
These properties are defined in a color.properties
or colors.json
file located in assets/[your pack namespace]/polytone/color.properties
or in assets/[your pack namespace]/polytone/colors.json
Inside the file you will be able to insert a list of color names and their HEX color value. The final file could look something like this:
map.grass = 62803d
map.sand = fcefc1
map.cloth = eaeded
dye.white = 0
dye.white.firework = 04343
As you might nave noticed .properties
and .json
are 2 of the supported schema, with the Properties file being there for legacy reason as its more familiar to resource pack creator and its simplidify suits itself well for a string to color mapping system such as this one.
You can however also use the more modern .json
schema if you so prefer.
Here's an example of two files in the different schemas having equivalent semantics. For more info google both standards, they are nothing specific to MC.
Properties syntax:
dye.black.firework = e3223
dye.black.text = 23532
dye.yellow.text = 8
map.grass = 777
Json syntax:
{
"dye": {
"black": {
"firework": "ff00ff",
"text": "23532"
}
"yellow": {
"text": "8"
}
}
"map": {
"grass": "777"
}
}
Below I'll use both standards interchangeably, just know how one is translated to the other. I suggest you use .json format so you get familiar with it as its widely used in all vanilla datapack stuff already and is used for all other Polytone objects.
These are the 64 separate colors that can be displayed on a map. Each block can have one associated. Note that if you want to change which block has a certain color instead of changing that color value you should refer the (link) Custom Block Properties section.
MAP COLORS LIST
Color Name |
---|
map.none |
map.grass |
map.sand |
map.wool |
map.fire |
map.ice |
map.metal |
map.plant |
map.snow |
map.clay |
map.dirt |
map.stone |
map.water |
map.wood |
map.quartz |
map.color_orange |
map.color_magenta |
map.color_light_blue |
map.color_yellow |
map.color_light_green |
map.color_pink |
map.color_gray |
map.color_light_gray |
map.color_cyan |
map.color_purple |
map.color_blue |
map.color_brown |
map.color_green |
map.color_red |
map.color_black |
map.gold |
map.diamond |
map.lapis |
map.emerald |
map.podzol |
map.nether |
map.terracotta_white |
map.terracotta_orange |
map.terracotta_magenta |
map.terracotta_light_blue |
map.terracotta_yellow |
map.terracotta_light_green |
map.terracotta_pink |
map.terracotta_gray |
map.terracotta_light_gray |
map.terracotta_cyan |
map.terracotta_purple |
map.terracotta_blue |
map.terracotta_brown |
map.terracotta_green |
map.terracotta_red |
map.terracotta_black |
map.crimson_nylium |
map.crimson_stem |
map.warped_hyphae |
map.warped_wart_block |
map.deepslate |
map.raw_iron |
map.glow_lichen |
Here's an example
{
"map": {
"gold": "-1",
"deepslate": "0"
}
}
Each DyeColor has 3 color values associated to it. More precisely
- Texture Diffuse Color (main color, used for beacons, collars and fish)
- Firework Color
- Text Color
Using color.properties you'll be able to chage each of these values using the syntax dye.[dye name].[color type]
. This also works with colors added by mods of course.
Color Type | Example |
---|---|
Diffuse | dye.red.diffuse (or just dye.red) |
Fireworks | dye.orange.firework |
Text | dye.light_blue.text |
Particle colors allows to easily change the color of ANY particle, modded or not.
To do so simply add the key particle.[full particle id]
. As value you can either assign a color number or a Math Expression.
This feature is just allows changing to a static color. For more control use the Particle Modifier system instead.
Here's an example
particle.minecraft:portal = 23223
particle.poof = 0
Special color that redstone block applies to redstone particle. Again you could do this with particle modifiers but wouldbe trickier since redstone does NOT have a dedicated particle. Colors here allow you to replace the color array that is used in there directly. Specify color from 0 to 15 to work poperly.
redstone.0 = ff00ff
redstone.1 = bb00ff
...
redstone.15 = 220000ff
Spawn egg colors can be changed by using the key egg.spots.[full spawn egg item id]
or egg.shell.[full spawn egg item id]
. If the entity spawn egg follows standard namig convention you can also omit the _spawn_egg
part
Here's an example
egg.shell.minecraft:villager_spawn_egg = 23223
egg.spots.minecraft:cow_spawn_egg = 23fa43
egg.shell.pig = -1
Used to change the world border colors. Here listed are them with their default values
{
"world_border":{
"growing": "4259712",
"shrinking": "16724016",
"stationary": "2138367"
}
}
To change a Mob Effect (the ones you get from potions and similar) color you can use the string effect.[full mob effect id]
Note that the id is the one of the Mob Effect and not the one of the Potion!
For legacy reason the key potion.
will also work but this is DEPRECATED and only there to assure backward compatibility with Optifine packs. Potions and Mob effects are 2 different things in the game, the correct name is Mob Effect.
You can also change the Water Bottle and Empty Potion colors using the special keywords water
and empty
.
Here's an example
effect.absorption = a32124
effect.minecraft:poison = 12231
effect.water = 0000bb
effect.empty = 444444
You know the drill by now. Note that these will also change according to dye color but will have priority
sheep.white = ff00ff00
sheep.red = 4
The game has 16 color codes that you can use in books, signs and similar. Their names do not match the dye color names so be sure to check them on the Minecraft Wiki. To change them you can either reference their numerical code
or their name directly as such:
text.code.0 = ff00ff
text.gold = ffff00
Title screen splash color
{
"text":{
"splash": "0x00ff22"
}
}
Changes the xp number on your xp bar. Uses text.xpbar
like so
{
"text":{
"xpbar": "0x00ff22"
}
}
Changes the color of xp orbs entities.
You can either define a color
or its red
green
and blue
components.
The content here will actually be an Expression that can use the TIME
and POS_X
, POS_Y
, POS_Z
variables. Check out the Scriptiong section.
{
"xporb":{
"red": "1",
"green": "0.2",
"blue": "0.5*sin(TIME)+1"
}
}