Select some text below, then pick a colour.
Your text
Discord preview
Server rules Read them before posting. Green means go, red means stop.
Copy this into Discord · 128 characters
```ansi \u001b[0;1;4;33mServer rules\u001b[0m Read them before posting. \u001b[0;1;32mGreen\u001b[0m means go, \u001b[0;1;31mred\u001b[0m means stop.\u001b[0m ```
Discord tools
Discord ANSI Color Generator
Discord has no inline colour syntax — colour only exists inside an ansi code block. Select your text, pick a colour, and copy a block that is ready to paste.
How to use it
Step 1
Type your message
Write the text you want to send. Line breaks are kept exactly as you type them.
Step 2
Select and colour
Highlight any part of the text, then choose a foreground colour, a background colour, rainbow, bold, or underline.
Step 3
Copy into Discord
Copy the generated ansi block and paste it straight into a Discord message. The fences are already included.
The escape codes behind the buttons
Each sequence starts with the escape character, then [, then semicolon-separated numbers, then m. 0 resets everything,1 is bold and 4 is underline.
| Text colour | Code |
|---|---|
| Dark gray | 30 |
| Red | 31 |
| Green | 32 |
| Gold | 33 |
| Blue | 34 |
| Pink | 35 |
| Teal | 36 |
| White | 37 |
| Background colour | Code |
|---|---|
| Dark blue | 40 |
| Orange | 41 |
| Marble blue | 42 |
| Turquoise | 43 |
| Gray | 44 |
| Indigo | 45 |
| Light gray | 46 |
| Cream | 47 |
Frequently asked questions
How does coloured text work in Discord?
Discord highlights fenced code blocks with highlight.js, and the "ansi" language understands a subset of ANSI escape sequences. Wrapping text in an escape sequence inside an ```ansi block is the only supported way to colour a message — there is no inline colour syntax.
Why do the colours not show on my phone?
ANSI rendering is supported in the desktop and web clients. Older mobile builds display the block as plain monospaced text, so treat colour as decoration and never as the only way you convey meaning.
Which colours can I use?
Eight foreground colours (codes 30-37) and eight background colours (40-47), plus bold and underline. They come from the Solarized palette, which is why the "white" foreground and "cream" background look slightly off-white.
Does the escape code count toward the 2,000-character limit?
Yes. Every colour change adds roughly 5 to 10 invisible characters. The generator shows the real length of the block so you can tell when a message is about to be rejected.
Can I colour only part of a line?
Yes. Select exactly the words you want and apply a colour — the generator splits the escape sequences for you. You can mix several colours on one line.
Can I use colour outside a code block?
No. Colour only exists inside an ansi code block, which also means the text keeps its monospaced font and code-block background. For regular formatting like bold or spoilers, use the Discord Markdown editor instead.
For everything else Discord supports, see the Discord Markdown cheat sheet, preview a full message in the Discord Markdown editor, or build event times with the timestamp generator.