Discord Colored Text Generator
Discord colors text inside a code block that uses the ansi language. Pick colors below and copy the finished block.
Text color
Background
Preview
How does colored text work in Discord?
Discord supports ANSI escape codes inside a code block marked ansi. Each colored part starts with an escape character and a code like [0;31m for red. A reset code, [0m, ends it. You cannot type the escape character on a keyboard, which is why copying from a generator is easier.
```ansi ␛[0;31mThis text is red␛[0m ```
␛ stands for the invisible escape character, Unicode U+001B. The copy button above includes the real one.
Discord ANSI color codes
| Code | Effect | Code | Effect |
|---|---|---|---|
| 0 | Normal | 1 | Bold |
| 4 | Underline | 30 | Gray text |
| 31 | Red text | 32 | Green text |
| 33 | Yellow text | 34 | Blue text |
| 35 | Pink text | 36 | Cyan text |
| 37 | White text | 40 | Dark blue background |
| 41 | Orange background | 42 | Marble blue background |
| 43 | Grayish turquoise background | 44 | Gray background |
| 45 | Indigo background | 46 | Light gray background |
| 47 | Cream white background |
Join codes with semicolons. [1;4;33m is bold, underlined yellow. Color names are approximate, since Discord's theme sets the exact shade.
Does colored text work on mobile?
Not at the time of checking. The colors show on the Discord desktop app and in the browser. The iOS and Android apps show the same code block without colors, so mobile readers still see your words.
Tips for good results
- Keep colored blocks short. Long blocks are hard to read on dark and light themes.
- Avoid gray text on a gray background. It almost disappears.
- Colors only work inside the code block, never in normal message text.
- Bots can send the same block. In code, write the escape as
\u001b.
Want simple styling instead? See Discord code blocks or the text formatting editor.
Frequently asked questions
Why is my Discord colored text not working?
Most often the hidden escape character got lost when copying, or the code block does not start with ```ansi. Copy with our button, which keeps the hidden character.
Does colored text work on Discord mobile?
No. The phone apps show the raw code block without colors. Colors show on the desktop app and in the browser.
What colors can I use?
Eight text colors (gray, red, green, yellow, blue, pink, cyan, white) and eight background colors. That is all Discord supports.
Can I color text outside a code block?
No. Discord has no color option for normal messages. Role colors only change names, not message text.