# Colored Items

{% hint style="warning" %}
This requires ItemsAdder 4.0.13 and Minecraft 1.21.4+ (both client and server).
{% endhint %}

To create a colored item you have to use a base texture, for example something like the quartz texture: `minecraft:item/quartz`.\
You can use any texture you want, in this case I use the quartz texture as it's white and already included in the game files.

<figure><img src="/files/LQKmiZknCvBn24RyLPt7" alt=""><figcaption></figcaption></figure>

Then specify the `color` attribute in the `graphics` properties. In this case I use `RED`.

It accepts the following format:

* `RED` (Bukkit `Color` enum)
* `#FFFFF` (Hexadecimal) (`#` is optional)
* `13083194` (Decimal)
* `255, 255, 255` (RGB)

```yaml
info:
  namespace: test
items:
  test_dyeable:
    name: Test Dyeable
    graphics:
      texture: minecraft:item/quartz
      color: RED
      hand_animation_on_swap: true
```

<figure><img src="/files/MEmaAX1V5PNyV6Q3iJFx" alt=""><figcaption></figcaption></figure>

### Chaging color during gameplay

You can change colors using the command `/iacolor <color>`.

### Templates and variants

You can create variants of the base item to make various variants of the same item but with different color.

Mark the base item as `template: true` then reference it using `variant_of: xxx` in the other items.

#### Example

```yaml
  test_dyeable_template:
    name: Test Dyeable
    template: true
    graphics:
      texture: minecraft:item/quartz
      color: RED
      hand_animation_on_swap: true
  test_dyeable2:
    name: Test Dyeable 2
    variant_of: test_dyeable_template
    graphics:
      color: BLUE
  test_dyeable3:
    name: Test Dyeable 3
    variant_of: test_dyeable_template
    graphics:
      color: "#326da8"
  test_dyeable4:
    name: Test Dyeable 4
    variant_of: test_dyeable_template
    graphics:
      color: 255,0,0
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://itemsadder.devs.beer/adding-content/colored-items.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
