Discord Color Text Generator

Build multi-colored Discord messages using ANSI color codes. Add text segments, pick colors, then copy the codeblock and paste it directly into any Discord chat.

1
Text color
2
Text color

Preview (approximate)

Hello, world! This is blue.

Colors are approximated — Discord renders ANSI differently per system theme.

Discord codeblock — paste directly into chat

```ansi
[ESC][1;32mHello, world![ESC][0m[ESC][34m This is blue.[ESC][0m
```

[ESC] marks invisible escape characters — they are embedded correctly when you click Copy.

Mobile note: Text colors work on Discord iOS and Android. Background colors (40–47) may not render on mobile — use foreground-only colors for cross-platform messages.
NordVPN

Protect your connection while you stream

Moderating a Discord community? Server members can sometimes trace admin IPs through voice channels and DMs. NordVPN keeps your real location private while you run your server.

Affiliate link — we may earn a commission at no cost to you.

Get NordVPN →

How the calculation works

Discord supports ANSI color codes inside ```ansi``` codeblocks. ANSI uses escape sequences to tell Discord which color to render — a special invisible character (ESC, U+001B) followed by [CODE]m.

Text color codes run from 30–37, background colors from 40–47. Codes can be combined with semicolons: ESC[1;31m = bold red. Each colored segment ends with ESC[0m to reset formatting.

This generator embeds the real ESC character automatically — just copy the output and paste into Discord.

Frequently asked questions

Does colored text work in all Discord servers?

Yes — ANSI color codes work in any Discord server or DM on Desktop and Web. You don't need any permissions or bots. Mobile support works for text colors; background colors may not render on iOS or Android.

Why does my pasted text look wrong?

Make sure you're copying the entire output including the triple backticks and 'ansi' tag. If you copy from a plain text field, the invisible ESC characters may get stripped — always use the Copy button in this tool.

Can I use colored text in bot messages?

Yes — if your bot sends messages via the API, include the ` ```ansi ``` ` codeblock with embedded ANSI escape codes in the message content string.

Why are background colors not showing on mobile?

Discord's mobile app renders ANSI text colors correctly but has inconsistent support for background color codes (40–47). If your message needs to look right on mobile, stick to foreground text colors only.

Can I have more than one color in a message?

Yes — add multiple text segments in the builder, each with its own color. They'll all be combined into a single codeblock that Discord renders inline.

How many colors does Discord ANSI support?

Discord supports 8 foreground text colors (black, red, green, yellow, blue, magenta, cyan, white) and 8 background colors using ANSI codes 30–37 and 40–47. There's no support for custom hex colors or gradients — only these 16 total color options.

Can I bold or underline colored text in Discord?

Yes — within an ansi code block you can combine formatting codes. Code 1 enables bold, code 4 enables underline, and they can be combined with color codes using semicolons: ESC[1;31m gives bold red text.

Does colored text work in Discord DMs?

Yes — ANSI color codes work in both server channels and direct messages on Discord desktop and web. The same paste process applies: copy the full codeblock output and paste directly into any Discord text field.

Related tools