Vai al contenuto

Minecraft Dyeable Items: Custom Items That Take Dye (26.3)

Make Minecraft dyeable items: add tint indexes to a model, a dye tint in the item definition, and give the item with the dyed_color component.

Aggiornato il 5 nov 2026Scritto per Minecraft 26.32 min di lettura

Written for Minecraft 26.3.

Minecraft dyeable items work by tinting. The model marks which faces take a colour, the item definition says where the colour comes from, and the dyed_color component supplies it. Change the component and the item changes colour.

Before you start

  • A custom item already working. Follow the custom items guide first.

  • A texture drawn in light or greyscale tones. A tint multiplies the colour, so a coloured texture muddies it.

  • The colour converter to turn a hex colour into the integer the command needs.

Make the model tintable

A face is tinted only if it has a tintindex. Use a model with elements and set tintindex on each face to colour. Save this as assets/myserver/models/item/cloak.json:

{
  "textures": {
    "layer0": "myserver:item/cloak"
  },
  "elements": [
    {
      "from": [0, 0, 7],
      "to": [16, 16, 9],
      "faces": {
        "north": { "uv": [0, 0, 16, 16], "texture": "#layer0", "tintindex": 0 },
        "south": { "uv": [0, 0, 16, 16], "texture": "#layer0", "tintindex": 0 }
      }
    }
  ]
}

Faces without a tintindex keep the texture's own colours.

Add the tint to the item definition

In assets/myserver/items/cloak.json, add a tints list to the model. The first entry applies to tintindex 0, the second to 1, and so on.

{
  "model": {
    "type": "minecraft:model",
    "model": "myserver:item/cloak",
    "tints": [
      { "type": "minecraft:dye", "default": 16777215 }
    ]
  }
}

The minecraft:dye tint reads the colour from the item's dyed_color component. If the item has none, it uses default, here 16777215, which is white (hex FFFFFF).

Give a dyed item

Set the model and the colour in one command. The colour can be an integer or a list of three floats from 0.0 to 1.0:

/give @s leather_horse_armor[item_model="myserver:cloak",dyed_color=8388403]
/give @s leather_horse_armor[item_model="myserver:cloak",dyed_color=[0.5,1.0,0.2]]

The integer is (Red << 16) + (Green << 8) + Blue, so 8388403 is hex 7FFF33. Hex also works in a command, as in dyed_color=0x7FFF33.

Dyeing in a crafting grid needs a dyeable base item. The dyed_color component only gives the item a colour. Whether a cauldron or crafting table can recolour it depends on the base item you chose, so test this before promising it to players.

Check it worked

  1. Reload with F3 + T.

  2. Run the command with dyed_color=8388403. The item should look green.

  3. Give another with a different value. The colour should change.

Common problems

The item is not coloured

The face has no tintindex, or the item definition has no tints list.

The colour looks dull or dark

The texture is too dark. Multiplying a dark colour by a tint gives a darker one. Lighten the base texture.

The wrong face is tinted

The tint entry order must match the tintindex numbers.

The colour is white

The item has no dyed_color, so the default is used. Check the component spelling. For other colour sources, see the custom armor guide.

Entra nel nostro Discord

Ricevi aiuto con i tuoi acquisti, scopri cosa stiamo preparando e parla con altri proprietari di server.