Discord Colored Text Generator

Type, select, color

Select words first. No selection colors the whole text.0 / 2,000
Text color
Background
Style

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.

By Cobra · Last updated

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 colorCodeBackgroundCode
Gray30Dark blue40
Red31Orange41
Green32Slate42
Yellow33Gray teal43
Blue34Gray44
Pink35Indigo45
Cyan36Light gray46
White37Cream47

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:

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

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.