How to use the colored text generator
- Type your text in the box above.
- Select a part of it and choose a text color, a background color, bold or underline.
- Press copy and paste the result straight into a Discord message.
Use the copy button instead of retyping. The result contains an invisible escape character that a normal keyboard cannot produce, so a hand-typed version will not color anything.
How colored text works in Discord
Discord has no color button for messages. The trick is a code block with the language set to ansi: three backticks, the word ansi, your text, then three closing backticks. Inside that block, Discord reads ANSI escape codes, the same kind of codes terminals use, and paints the text.
These are the options Discord understands:
- Text colors: gray, red, green, yellow, blue, pink, cyan and white.
- Background colors: eight background shades, using codes 40 to 47.
- Styles: bold and underline.
That is the full palette. You cannot use custom hex colors, and the exact shades are chosen by Discord, so they can look a little different from the preview on this page. Discord's theme also changes how some of them read, so check your message in dark and light mode if it matters.
Where it works and its limits
Colored text works in Discord's desktop clients, in the body of a message. It shows inside a code block, so you get a monospaced font and a dark box around the text. That suits rules, status boards, game stats and short announcements better than normal chat.
Phones are the weak spot. Guides and user reports describe ANSI blocks on the mobile app as unreliable: colors may be missing, and the text may fall back to plain white or look messy. Reports vary by app version, so assume that part of your audience will not see the colors. Write the message so that it still makes sense as plain text, and never use color alone to carry meaning. That also helps members with color vision differences.
It does not work in nicknames, server names or channel names. For those, try Discord fonts instead.
Why is my colored text not showing?
Check that the first line of the block says ansi and nothing else, and that you pasted the copied text without changing it. If it still looks plain, you are probably viewing it on a phone. Try it on desktop.
Can I color normal messages without a code block?
No. Normal messages have bold, italics, underline and similar formatting, but no color. Role colors only affect names.
Do I need Nitro or a bot?
No. Any member who can send messages in the channel can post a colored block. Bots can post the same code too.
Can I use a Discord timestamp inside colored text?
No. Formatting is not processed inside code blocks, so a timestamp appears as raw text. Put it on a separate line outside the block.
Is it good for server rules?
It can be, as long as the rules stay readable without color. Keep the block short, since long colored blocks are tiring to read and hard to follow on a small screen. If you are preparing a server for new members, the guide on making a Discord server covers what to set up first.