# Text Formatting

{% hint style="warning" %}
Doesn't work in [Minecraft language files](https://github.com/LoneDev6/Wiki-ItemsAdder/blob/japanese/plugin-usage/broken-reference/README.md) due to a Minecraft limitation.
{% endhint %}

## How to use colored texts

You can change color of text and specify a custom hex color using the special notation.

### Basic

`display_name: '&6TEST'`

```yml
items:
  custom_nbt_item_display_name_classic:
    enabled: true
    display_name: '&6TEST'
    resource:
      generate: false
      model_path: minecraft:item/emerald
      material: PAPER

```

### Minimessage

{% embed url="<https://webui.advntr.dev/>" %}

{% embed url="<https://docs.advntr.dev/minimessage/format.html>" %}

```yml
info:
  namespace: git_2224
  dictionary-lang: en
dictionary:
  display-name-test_gradient_dictionary: <b><color:#57ff5c>test</color></b><gradient:#ff00ee:#f79459>Amogus</gradient>
items:
  test_gradient_dictionary:
    display_name: display-name-test_gradient_dictionary
    lore:
      - "&6yo0"
      - "&2yo1"
    resource:
      generate: false
      model_path: minecraft:item/emerald
      material: PAPER
  test_font:
    display_name: <gradient:#ff00ee:#f79459><font:alt>Alt font used for this item</font></gradient>
    lore:
      - "<gradient:#ff00ee:#f79459><font:alt>Alt font used for this item</font></gradient>"
      - "<gradient:#ff00ee:#f79459><font:alt>Alt font used for this item</font></gradient>"
    resource:
      generate: false
      model_path: minecraft:item/emerald
      material: PAPER
```

```
<#FE5A00>Magic Fuel
<red>Magic <green>Fuel
<gradient:#ff00ee:#f79459>Here is a gradient example text!
```

<div><figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-c8036f43996e81530fcac312a1e2e241ee9a18ac%2Fimage%20(3)%20(1)%20(1)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-fbd4c0326d10377da99e87d339abdc916615b582%2Fimage%20(2)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-d5c8dd499596e7ed5c6d0b9b5a7df89bd82e2128%2Fimage%20(45).png?alt=media" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-e90e709ccd4f0481ffca6c06edcc2a3a645f2070%2Fexample_minimessage_2.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-cae715b65e9cc5636f3030a0e7fc025cbecb0510%2Fexample_minimessage_1.png?alt=media" alt=""><figcaption></figcaption></figure></div>

### Component

{% embed url="<https://minecraft.tools/en/json_text.php>" %}

```yaml
items:  
  custom_nbt_item_display_name_component:
    display_name: '{"text\":"TEST", "font": "alt"}'
    resource:
      generate: false
      model_path: minecraft:item/emerald
      material: PAPER
```
