Discord Colored Text Generator
- Runs on your device
- Nothing uploaded
- Free, no sign-up
Type, select, color
Blank page? Try a sample:
Check the preview, then copy
Colors are close to Discord's dark theme on desktop. Bold may look the same as regular text in Discord's code font.
- Click the message box in the Discord desktop app or in a browser and paste (Ctrl+V, or Cmd+V on a Mac).
- Send it. The ```ansi line and the codes disappear and the colors show. Readers on phones may see it without color.
Worked example: one green word
Say you want a status line where only ONLINE is green and bold. Type Server status: ONLINE, select ONLINE, press Green, then Bold. Copy for Discord puts this on your clipboard, where ESC stands for one invisible escape character:
```ansi
Server status: ESC[0;1;32mONLINEESC[0m
```
The 21 characters you typed became 46 once pasted. The wrapper (```ansi, the line breaks and the closing backticks) is 12 of the extra characters, the color switch on is 9, and the switch back off is 4 (each ESC counts as 1). Every place the color changes costs a few more characters, which is why the counter above counts the copied block, not just your words. The "Status board" sample, with four colored spots over three lines, is a good one to load and compare.
The 16 colors Discord knows
Discord maps the classic ANSI codes to its own palette. The swatches are the colors people have measured from the desktop app; Discord does not publish them, so treat them as close, not exact.
| Text color | Code | Background | Code |
|---|---|---|---|
| Gray | 30 | Dark blue | 40 |
| Red | 31 | Orange | 41 |
| Green | 32 | Slate | 42 |
| Yellow | 33 | Gray teal | 43 |
| Blue | 34 | Gray | 44 |
| Pink | 35 | Indigo | 45 |
| Cyan | 36 | Light gray | 46 |
| White | 37 | Cream | 47 |
Style codes: 0 resets everything, 1 is bold and 4 is underline. Codes are joined with semicolons, so 1;31;47 is bold red on cream. This page starts every switch with 0 so a color never leaks into the next word by accident.
Why it has to be a code block
Normal Discord messages ignore escape codes. The coloring only happens inside a code block whose language word is ansi, the same way js or py turns on syntax colors. That has side effects worth knowing before you plan a fancy announcement:
- The text is in a monospace code font on a darker box, not regular chat text.
- Markdown is off inside it.
**bold**,||spoilers||, links, mentions, emoji shortcodes and<t:>timestamps all show exactly as typed. - You can't type the escape character on a keyboard, which is the whole reason a generator helps. If you edit the block in Discord afterward, the codes are still there but invisible, so it is easier to edit here and paste again.
For a post that mixes both, send the colored block and a normal formatted message (the Discord text formatter handles that part), or put the colored block at the end of one message.
Where this falls short
- Phones. Discord's iOS and Android apps have not shown ANSI colors reliably. Readers there may see plain gray text. We can't fix that from a web page; check it on your own phone.
- Light theme. The colors stay the same in light theme, so white text and the cream background can get hard to read.
- Sixteen colors, no hex. You can't pick your brand color. If you need exact colors, use an image or a role color instead.
- Bold is subtle. In Discord's code font, bold often looks the same as regular weight. Use a color to make something stand out.
- Names, bios and embeds. This only works in messages. Bots can send it in their messages too, but it is still a code block.
- The preview is an approximation. Discord changes its look from time to time. The codes it reads have stayed the same, but the exact shades may not.
ToolPetal is not affiliated with, endorsed by, or sponsored by Discord. Discord is a trademark of Discord Inc. Color support can change, so test on the devices your server uses.
Discord colored text, answered
How do I type colored text in Discord?
Discord colors text inside a code block that starts with ```ansi. Each color is set by an escape code, which you can't type on a normal keyboard, so the easy way is to color it here, press Copy for Discord, and paste it into the message box.
Why does my colored text show up gray or white on my phone?
Discord shows ANSI colors on the desktop app and in the browser. The phone apps have not shown them reliably, so people reading on a phone may see the same words without color. Check your message from your own phone before you count on the colors.
What colors can Discord show in text?
Eight text colors (gray, red, green, yellow, blue, pink, cyan, white) and eight background colors, plus bold and underline. There is no way to pick a custom hex color in a message.
Can I use colored text in my Discord name, bio or channel name?
No. The ansi trick only works inside a code block in a message. Usernames, nicknames, bios, channel names and role names show the escape codes as nothing or as plain characters, and role color is set in Server Settings instead.
Do the color codes count toward the 2,000 character limit?
Yes. Each color change adds a short code of 4 to 14 characters, and the ```ansi wrapper adds 12 more. The counter on this page counts all of it, so you know before you paste.
Can I mix colors with bold, spoilers or links?
Bold and underline work, because they are ANSI codes too. Markdown such as **bold**, ||spoilers||, links and mentions does not work inside a code block, so it shows as typed.