Discord Colored Text Generator
Create colored text for Discord using ANSI escape codes. Type into the editor, highlight a span of text, then click a colour or style to apply it to just that selection. Copy the result and paste into any Discord channel — works on Discord Desktop and the browser client.
Tip: on desktop, click-and-drag to highlight a word or phrase. On mobile, long-press to select, then tap a colour or style to apply it.
Toolbar — apply to the highlighted selection
Styles
Foreground colour
Background colour
Discord Output
Ready-to-paste ANSI code block, regenerated as you edit.
Show raw escape sequences
Quick Presets
Click a preset to insert a styled snippet at the cursor position in the editor. Stack several to build a multi-style message.
How Discord ANSI Colored Text Works
Discord rolled out limited ANSI color support inside code blocks in mid-2022. The trick: open a fenced code block with three backticks followed by the ansi language tag, then drop in ANSI escape sequences of the form [CODEm before the characters you want to style. Discord's renderer reads the codes, applies the color or style to everything that follows, and resets at [0m. Outside a code block the escape character is stripped, which is why colored text only ever displays inside this specific block type.
The set of codes is small and deliberate. Foreground colors run from 30 to 37, background colors from 40 to 47, and you can prepend 1 for bold or 4 for underline. Discord maps each numeric code to a specific hex value in its own palette — it doesn't honour your local terminal theme. The colors are subtle by design so colored announcements stay readable against Discord's dark and light themes.
Step-by-Step Copy and Paste Workflow
- Type your message into the dark editor at the top.
- Click and drag to highlight a word, phrase or line you want to style.
- Click a foreground colour, optionally a background, plus Bold or Underline for emphasis. The selection is wrapped immediately.
- Repeat for other spans — different parts of the same message can carry different colours.
- Click Copy for Discord. The output already includes the surrounding triple-backtick
ansicode block. - Switch to Discord, click in the message box of any channel or DM, and paste with Ctrl+V (Windows/Linux) or Cmd+V (macOS).
- Send. The colours render immediately on Desktop and the browser client.
Compatibility caveats
- Desktop client and browser Discord: full color support inside
ansicode blocks. - Mobile Discord (iOS / Android): many versions render the code block in monospace but skip the colors. The message still arrives intact.
- Discord embeds and webhooks: ANSI escapes inside an embed description may not be preserved by every webhook implementation.
- Bots and copy-paste forwarding: some bots strip the escape character. Test once in a private channel before sending into production servers.
Discord ANSI Color Cheatsheet
| Color | ANSI Code | Type | Swatch |
|---|---|---|---|
| Gray | 30 | Foreground | |
| Red | 31 | Foreground | |
| Green | 32 | Foreground | |
| Yellow | 33 | Foreground | |
| Blue | 34 | Foreground | |
| Pink (Magenta) | 35 | Foreground | |
| Cyan | 36 | Foreground | |
| White | 37 | Foreground | |
| Firefly Dark Blue | 40 | Background | |
| Orange | 41 | Background | |
| Marble Blue | 42 | Background | |
| Greyple | 43 | Background | |
| Indigo | 44 | Background | |
| Light Gray | 45 | Background | |
| Dark Gray | 46 | Background | |
| White | 47 | Background | |
| Bold | 1 | Style | Sample |
| Underline | 4 | Style | Sample |
| Reset | 0 | Control | — |
Where to use Discord colored text
Server announcements
Bold red for warnings, cyan or green for positive updates — colored headlines stand out far better than plain bold text in a busy #announcements channel.
Rules and pinned messages
Use background colors to flag critical rules, underline to mark links or rule numbers, and a consistent color scheme to group related rules together.
Code review channels
Highlight bug locations in red, suggested fixes in green, and questions in yellow. Pair with regular code blocks for the surrounding code.
Dev channel emphasis
Mark log lines by severity, distinguish prod from staging, or call out a specific token in a long shell output. Keeps technical chat scannable.
ASCII art with color
Apply different ANSI codes line-by-line for a multi-color banner, logo or rainbow gradient. Works perfectly with the monospaced font Discord uses inside code blocks.
Role and tier labels
Color-coded role badges or tier headers (e.g. Bronze / Silver / Gold) make role-locked channels feel polished without needing a bot or custom emoji.