How Discord Colored Text Works
Discord does not have a font-color button in chat. Color comes from syntax highlighting inside a code block. If the language tag is ansi, the desktop and web clients read a small set of ANSI SGR codes and paint the text. A discord colored text generator is a form that writes those codes for you, so you do not have to insert an invisible escape character by hand.
The block always starts with three backticks and the word ansi. Each colored phrase is prefixed by an escape character, an opening bracket, one or more numbers separated by semicolons, and the letter m. 0 resets styling, 1 is bold, and 4 is underline. A final reset closes the block so the next message is not stuck in the last color. The source box under the preview writes the escape character as the letters ESC so you can read it. The copy button uses the real character, which is what Discord expects.
How to Build a Message
- Pick a foreground color, and a background if you want one. Turn on bold or underline. These apply to the phrase you are about to add.
- Type the phrase. The preview updates before you commit it, so you can see the color on the dark code block.
- Click “Add to message” and repeat with a different color. Each phrase is reset before it is painted, so a red line does not leak into the next one.
- Click Copy and paste into Discord on desktop or in the browser.
The sample message starts as bold green “Hello” plus underlined cyan “ from the translator”. Clear it if you want a blank message. Remove deletes a single phrase without touching the others. A message of one color can be copied from the draft alone. You only need Add when the message mixes styles.
Foreground Colors Discord Will Paint
These eight codes are the foreground set. The names are the ones people use in chat. The swatch is the color the client actually draws, which is why green is an olive and yellow is a gold rather than a pure RGB primary. Gray (30) is dim on Discord's dark code block. White (37) is the high-contrast choice for a dark background.
| Code | Name | As drawn |
|---|---|---|
| 30 | Gray | Gray |
| 31 | Red | Red |
| 32 | Green | Green |
| 33 | Yellow | Yellow |
| 34 | Blue | Blue |
| 35 | Pink | Pink |
| 36 | Cyan | Cyan |
| 37 | White | White |
Background Colors
Backgrounds use 40 through 47. They do not follow the usual “40 is black, 41 is red” naming once Discord has painted them. 40 is a dark blue, 41 is orange, 45 is indigo, and 47 is a warm white. Put a light foreground on a dark background, and a dark foreground on 47, or the letters disappear. Bold and underline combine with either set: the code 1;4;37;45 is bold, underlined, white text on indigo.
| Code | Name | As drawn |
|---|---|---|
| 40 | Dark blue | Dark blue |
| 41 | Orange | Orange |
| 42 | Marble blue | Marble blue |
| 43 | Grey turquoise | Grey turquoise |
| 44 | Gray | Gray |
| 45 | Indigo | Indigo |
| 46 | Light gray | Light gray |
| 47 | White | White |
Limits, Mobile, and Nearby Tools
ANSI coloring is a desktop and web feature. The iOS and Android apps show the code block as plain text, so a colored announcement still needs to make sense without the color. A Discord message allows 2000 characters, and every escape sequence counts. The preview reports the length of the block, including the fence. Backticks inside your phrase are turned into apostrophes so they cannot close the code block early.
Color is not the only way to dress up a message. A picture of Undertale-style lettering comes from the Undertale font generator. Galactic glyphs for a caption come from the enchanting table translator. Wingdings symbols, including the set used for Undertale's Gaster text, come from the Gaster translator.
Frequently Asked Questions
How do I paste colored text into Discord?
Click Copy, then paste into a Discord channel or DM on desktop or in the browser. The clipboard already includes the ansi code fence and the escape codes.
Why does the color disappear on my phone?
The Discord mobile apps do not render ANSI colors inside code blocks. The message is still there, but it shows as plain monospaced text. Desktop and the web app do color it.
Which codes does Discord actually support?
Reset is 0, bold is 1, and underline is 4. Foreground colors are 30 through 37. Background colors are 40 through 47. This generator does not emit other SGR codes, such as italic.
Why is green olive and yellow gold?
Discord colors ANSI with the highlight.js palette, not the bright terminal primaries. The preview uses those same hex values so a message does not look different after you paste it.
Is there a length limit?
A normal Discord message allows 2000 characters, and the escape codes count toward that limit. The tool shows the length of the block you are about to copy.