Type your message, highlight any part of it and click a color. The tool writes the ANSI escape codes for you and gives a ready-to-paste ```ansi code block that shows up in color in Discord.
Last updated:
Text color
Background
Style
Tip: highlight words, then pick a color. Nothing selected? The style applies to what you type next.
Discord preview
YouToday at 12:00
Code to paste
Colors show in Discord on desktop and in the browser. The mobile apps display ansi blocks as plain text. ESC marks the invisible escape character that is copied with the text.
Advertisement
Advertisement
How to use the Discord Colored Text Generator
Type or paste your message into the dark editor.
Highlight the words you want to color with your mouse or Shift + arrow keys.
Click a text color, a background color, Bold or Underline. Click Clear style to make the selection plain again.
Check the Discord preview below the editor.
Press Copy for Discord and paste it into any Discord channel or DM on desktop or web.
Discord ANSI color codes
Discord colors text only inside a code block that starts with ```ansi. Each style is switched on with an escape sequence: the invisible ESC character (Unicode U+001B), an opening bracket, one or more numbers separated by semicolons and the letter m. For example ESC[1;31m means bold red and ESC[0m resets everything back to plain text.
Code
Text color
Code
Background color
30
Gray
40
Firefly dark blue
31
Red
41
Orange
32
Green
42
Marble blue
33
Yellow
43
Greyish turquoise
34
Blue
44
Gray
35
Pink
45
Indigo
36
Cyan
46
Light gray
37
White
47
Cream white
Format codes: 0 resets all styles, 1 is bold and 4 is underline. You can combine them, so ESC[1;4;33;40m gives bold, underlined yellow text on a dark blue background. The color names above are the ones Discord's palette resembles; the exact shades are set by Discord.
Tips for colored Discord messages
Use it for announcements, rules and role lists. A few highlighted words stand out more than a fully colored message.
Keep contrast in mind. Gray text and the dark blue background are hard to read on Discord's dark theme; white or cream backgrounds work well with gray text.
Remember mobile readers. On phones the block shows as plain monospace text, so don't rely on color alone to carry meaning.
Other markdown doesn't work inside the block. Emoji shortcodes, mentions, links and **bold** markdown are shown literally inside code blocks; use the Bold button instead.
Frequently asked questions
How does colored text work in Discord?
Discord renders code blocks tagged with the language ansi and understands ANSI escape codes inside them. A code such as ESC[31m switches to red, ESC[1m to bold and ESC[0m resets. This generator inserts those invisible ESC characters for you, so you only have to paste.
Which colors can Discord show?
Discord supports 8 text colors (gray, red, green, yellow, blue, pink, cyan and white, codes 30 to 37) and 8 background colors (codes 40 to 47), plus bold (1) and underline (4). Other ANSI codes such as 256-color or RGB codes are ignored.
Why is my colored text not showing on my phone?
The Discord mobile apps currently show ansi code blocks as plain monospace text without colors. The colors appear in the Discord desktop app and in the browser version. Your friends on mobile will still see the text, just uncolored.
Why do I see strange characters like [31m?
That happens when the invisible ESC character was lost, for example when the code was typed by hand or copied through an app that strips control characters. Use the Copy for Discord button and paste directly into Discord. The message must start with ```ansi on its own line.
Is there a length limit?
A Discord message can be up to 2,000 characters, or 4,000 with Nitro. The escape codes count toward the limit, so heavily styled text uses more characters. The counter under the output shows the real length including the codes.
Can I edit colored text I made earlier?
Yes. Paste the whole ```ansi block (with the escape codes) into the editor and the colors are read back in, so you can change them and copy again.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.