# PlaceholderAPI Support

## 📝 Placeholders Overview

### 🎨 Introduction

NameGradient provides a wide variety of placeholders for PlaceholderAPI that allow you to display names, gradients, and color styles in different formats. All placeholders begin with `%namegradient_`.

Requirement: You need to have PlaceholderAPI installed on your server.

### 💬 Chat placeholders

<table><thead><tr><th width="365">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td><code>%namegradient_gradient_chat_id%</code></td><td>Returns the ID of the chat gradient equipped by the player (returns “” if none is equipped).</td></tr><tr><td><code>%namegradient_gradient_chat_patterns%</code></td><td>Displays the hexadecimal colors that make up the chat gradient.</td></tr><tr><td><code>%namegradient_gradient_chat_style%</code></td><td><p>Displays the type of style applied (bold, italic, etc.).</p><p>Possible outputs: <strong>BOLD, ITALIC, UNDERLINE, STRIKETHROUGH</strong></p></td></tr><tr><td><code>%namegradient_gradient_chat_minimessage%</code></td><td><p>Returns the chat gradient format in MiniMessage syntax.</p><p>Example output:</p><p><strong>&#x3C;gradient:#FF0000:#00FF00:#0000FF></strong></p></td></tr></tbody></table>

#### 👤 Name Placeholders

<table><thead><tr><th width="365">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td><code>%namegradient_gradient_name%</code></td><td>It will give the name of the player formatted with the gradient (ideal for use in chat or tab).</td></tr><tr><td><code>%namegradient_gradient_name_id%</code></td><td>Gets the identifier of the currently equipped gradient for the name.</td></tr><tr><td><code>%namegradient_gradient_name_patterns%</code></td><td>Displays the hexadecimal colors that make up the name gradient.</td></tr><tr><td><code>%namegradient_gradient_name_style%</code></td><td><p>Displays the type of style applied (bold, italic, etc.).</p><p>Possible outputs: BOLD, ITALIC, UNDERLINE, STRIKETHROUGH</p></td></tr><tr><td><code>%namegradient_gradient_name_minimessage%</code></td><td>Returns the player's name formatted specifically for MiniMessage, ideal for plugins such as TAB or LuckPerms.</td></tr><tr><td><code>%namegradient_text_gradient_[#RRGGBB,#RRGGBB]_[TEXT]_[STYLE]%</code></td><td>It will format your text with the colors and stylo assigned to it.</td></tr><tr><td><code>%namegradient_cooldown_custom%</code></td><td>Cooldown before you can change the custom gradient again.</td></tr></tbody></table>

​

### ⚙️ Advanced placeholder

<table><thead><tr><th width="467">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td><code>%namegradient_gradient_name_HEX%</code></td><td>With this placeholder you can get your name in HEX format <code>&#x26;#RRGGBB</code></td></tr><tr><td><code>%namegradient_gradient_name_LEGACY_HEX%</code></td><td>With this placeholder you can get your name in HEX format <code>&#x26;x&#x26;R&#x26;R&#x26;G&#x26;G&#x26;B&#x26;B</code></td></tr><tr><td><code>%namegradient_gradient_name_ANGLE_BRACKETS%</code></td><td>With this placeholder you can get your name in HEX format <code>&#x3C;#RRGGBB></code></td></tr><tr><td><code>%namegradient_gradient_name_STANDARD%</code></td><td>With this placeholder you can get your name in HEX format <code>#RRGGBB</code></td></tr></tbody></table>

<table><thead><tr><th width="467">Placeholder</th><th>Description</th></tr></thead><tbody><tr><td><code>%namegradient_gradient_name_patterns_HEX%</code></td><td>With this placeholder, you can get the hex values of the equipped gradient in HEX &#x26;#RRGGBB format.</td></tr><tr><td><code>%namegradient_gradient_name_patterns_LEGACY_HEX%</code></td><td>With this placeholder, you can get the hex values of the equipped gradient in HEX format <code>&#x26;x&#x26;R&#x26;R&#x26;G&#x26;G&#x26;B&#x26;B</code>  </td></tr><tr><td><code>%namegradient_gradient_name_patterns_ANGLE_BRACKETS%</code></td><td>With this placeholder, you can get the hex values of the equipped gradient in HEX format <code>&#x3C;#RRGGBB></code></td></tr><tr><td><code>%namegradient_gradient_name_patterns_STANDARD%</code></td><td>With this placeholder, you can get the hex values of the equipped gradient in HEX format <code>#RRGGBB</code></td></tr></tbody></table>

### 🧾 Placeholder Fields Overview

| Placeholder Field | Description                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------- |
| `placeholder`     | Displays the name or label of the requirement (e.g. `"Kills"`, `"Playtime"`).             |
| `condition`       | The condition operator required to fulfill the requirement (e.g. `>=`, `==`).             |
| `value`           | The target value that must be reached (e.g. `100`, `3600`).                               |
| `success`         | Message shown if the requirement is completed.                                            |
| `fail`            | Message shown if the requirement is not completed.                                        |
| `completed`       | Returns `true` if the requirement has been completed, `false` otherwise.                  |
| `lore`            | A pre-formatted visual line that uses `success` or `fail` based on the completion status. |

***

### 📌 Placeholder Context Types

| Context Prefix             | Purpose                                                                             |
| -------------------------- | ----------------------------------------------------------------------------------- |
| `requirements_...`         | Shows data for a specific gradient and requirement, regardless of what is equipped. |
| `current_requirements_...` | Shows data for the currently equipped gradient and its requirements.                |

***

### ✅ Example: Using a Requirement Placeholder

Assume you have a `NAME` type gradient called `FireTrail`, with a requirement to have at least `100` kills:

| Placeholder                                                | Example Value                                                                     |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `%namegradient_requirements_NAME_FireTrail_1_placeholder%` | `Kills`                                                                           |
| `%namegradient_requirements_NAME_FireTrail_1_condition%`   | `>=`                                                                              |
| `%namegradient_requirements_NAME_FireTrail_1_value%`       | `100`                                                                             |
| `%namegradient_requirements_NAME_FireTrail_1_success%`     | `✔ Requirement complete!`                                                         |
| `%namegradient_requirements_NAME_FireTrail_1_fail%`        | `✖ You need more kills.`                                                          |
| `%namegradient_requirements_NAME_FireTrail_1_completed%`   | `true` *(if player has ≥ 100 kills)*                                              |
| `%namegradient_requirements_NAME_FireTrail_1_lore%`        | `✔ Requirement complete!` *(if completed)* or `✖ You need more kills.` *(if not)* |

> You can use `%namegradient_current_requirements_NAME_*%` to automatically refer to the **currently equipped gradient** instead of specifying one.
