> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edcosmetics/cosmetics/colours.md).

# Colours & Tags

## COLOR cosmetics

A COLOR category gives the player a colour that your other plugins show through placeholders: the name colour in the tab list, the chat colour, the rank colour... Make as many COLOR categories as you like.

```yaml
type: COLOR
placeholder:
  default: ''
  apply-to: '%player_name%'   # the text _apply paints
  format: '{value}'           # wraps _apply, e.g. '{value} '
cosmetics:
  sunset:
    name: '<gradient:#FF512F:#F09819>Sunset</gradient>'
    color: 'gradient:#FF512F:#F09819'
```

`color:` is one of:

| Value                                     | Meaning                                                       |
| ----------------------------------------- | ------------------------------------------------------------- |
| `'&c'` `'&#FF5555'` `'#FF5555'` `RED`     | a plain colour                                                |
| `'gradient:#FF512F:#F09819'`              | a gradient (2 or more stops)                                  |
| `'rainbow'` / `'rainbow:3'`               | an animated rainbow (a full cycle every 3 seconds, default 5) |
| `'&c&l'`, `'gradient:#FF0000:#0000FF &l'` | formats go after the colour                                   |

Gradients and rainbows are turned into one colour per letter, so the result works in any plugin.

### Animated text effects (`fx-`)

The default colour categories end with 60+ cosmetics whose id starts with `fx-` (Inferno, Blue Flame, Glitch, Hologram, Galaxy, Aurora, Sakura, Rainbow God...). They are animated text effects drawn by the plugin's resource pack: each one's `color` is an exact hex value the text shader recognises, and the shader animates every letter written in it (flames, waves, shine, bouncing, glitching). They work anywhere text is drawn: chat, tab list, name tags, scoreboards, menus.

* Copy an `fx-` cosmetic into any COLOR, TEXT or message category to use the effect there; keep its `color` exactly as it is (a changed value is a plain colour).
* Without the pack (or when another plugin's text shader wins, see [Resource Pack](/p/edcosmetics/getting-started/resource-pack.md)) they show as that plain colour.

### Chat colours

* Chat plugins that expand gradients (MiniMessage based): put `%edcosmetics_chatcolor_start%` before and `%edcosmetics_chatcolor_end%` after the message in their format.
* Other chat plugins that keep the message's colours: set `chat-message: true` in the category and the message itself is painted. Players can't slip colour codes in through it.

## TEXT cosmetics (tags)

```yaml
type: TEXT
placeholder:
  default: ''
  format: ' {value}'      # e.g. a space before the tag
cosmetics:
  legend:
    name: '&6Legend'
    text: '&8[&6&lLEGEND&8]'
```

`%edcosmetics_tags%` gives the tag inside `format`, `%edcosmetics_tags_raw%` only the tag. Colours, gradients, rainbows and `fx-` effects work in `text`. Example chat name format: `'&f%player_name%%edcosmetics_tags%'`.

## Examples

* TAB `groups.yml`: `customtabname: "%edcosmetics_tabpaint_apply%"`, `tabprefix: "%edcosmetics_rankcolor_apply%"`.
* A rank colour: `rankcolor.yml` with `apply-to: '%vault_prefix%'` and `format: '{value} '` paints the player's rank prefix; `%edcosmetics_rankcolor_apply%` in the chat prefix.
* For animated rainbows, give the placeholder a short refresh interval in TAB (`placeholder-refresh-intervals`, e.g. `"%edcosmetics_tabpaint_apply%": 500`).
