Discord colored text generator
Updated
Discord has no text-colour button, but it colours text inside a code block tagged ansi using terminal colour codes. Build the message part by part below, check the preview, and copy it: the button includes the invisible escape characters that make the colours work. Runs in your browser.
Build passed · 2 warnings```ansi \u001b[0mBuild \u001b[0;1;32mpassed\u001b[0;33m · 2 warnings\u001b[0m ```
Shown with \u001b where the copied text has the invisible escape character. Copy with the button: typing \u001b by hand does not work in Discord.
How does an ANSI colour code work?
Each sequence changes the style of everything after it until the next sequence. The generator starts every part with 0 (reset) so one part's colour never leaks into the next, and ends the block with a reset. The colour table below matches the palette documented in the Python Discord guide to coloured messages.
- 30Gray
- 31Red
- 32Green
- 33Yellow
- 34Blue
- 35Pink
- 36Cyan
- 37White
- 40Dark blue
- 41Orange
- 42Slate
- 43Gray teal
- 44Gray
- 45Indigo
- 46Light gray
- 47Cream
What are the limits of coloured text on Discord?
The colours exist only inside a code block, so the text is monospaced and other formatting such as bold with asterisks, links and mentions does not apply there. The mobile apps show the block without colours (see this thread on Discord's community forum). For ordinary emphasis, Discord's regular markdown formatting works everywhere and needs no special characters.
How do you write in color on Discord?
Send a code block whose language is ansi. Inside it, put an escape sequence before each piece of text: the escape character, then [, then colour codes separated by semicolons, then m. For example ESC[1;32m makes the following text bold and green. The generator above writes these sequences for you, because the escape character cannot be typed on a normal keyboard.
Does colored text work on Discord mobile?
Not in colour. The Discord mobile apps show the ansi code block and its text but drop the colours, according to reports from users on Discord’s own community forum. The desktop app and the browser show the colours. If most of your server reads on phones, do not rely on colour alone to carry meaning.
Why does my colored text show strange characters like [0;31m?
The escape character was lost, usually because the text was retyped or passed through something that strips control characters. Discord then shows the rest of the sequence as plain text. Copy the message with the generator’s button and paste it straight into Discord, or make sure your bot sends the real character (\u001b in most programming languages).
Which colours can Discord show in an ansi block?
Eight text colours (codes 30 to 37), eight background colours (40 to 47), plus bold (1) and underline (4), with 0 resetting everything. Discord maps the codes to its own fixed palette, shown in the swatches above, so you cannot pick an arbitrary hex colour. Not every combination is easy to read on Discord’s dark theme.