Skip to main content

Discord Color Text Generator — ANSI Codes

Pick foreground + background from Discord's 8-color ANSI palette, toggle bold and underline, copy the ```ansi code block ready to paste. Live preview matches Discord's actual desktop rendering. Mobile clients render plain — colors are desktop + browser only.

ANSI escape codes inside the mandatory ```ansi fence. Desktop + browser only — mobile Discord strips colors.

How Discord color text actually works

Discord supports ANSI SGR escape codes — but only inside a triple-backtick code block opened with the ansi language hint. The format is [<code>m, where <code> is one of Discord's 8 foreground colors (30-37), 8 background colors (40-47), or the modifiers 1 (bold) and 4 (underline). Multiple codes combine with semicolons:  = bold red on dark blue. Always close with  to reset. Anything outside this 16-color subset renders as plain text — 256-color and true-color codes don't work in Discord.

Why the colors look slightly muted

Discord's foreground colors approximate the Solarized palette rather than the standard VT100 terminal default. Solarized was designed for low-eyestrain reading on a dark surface; the Red is a desaturated brick, Yellow is a dark amber, Blue is a muted ocean. Discord's background colors are a custom palette and don't map cleanly onto Solarized — "Firefly Dark Blue" (40), "Marble Blue" (42), "Greyish Turquoise" (43) are Discord-specific names. The swatches in the generator above match Discord's actual rendering, so what you see in the picker is what your message will look like in chat.

Mobile Discord and the gray-text problem

Discord's iOS and Android clients don't parse ANSI escape codes inside code blocks, so your carefully colored message arrives on mobile as plain monospace text inside a code block, with no color. Mobile is a substantial share of Discord traffic, so colored text is most useful in creator-focused communities with desktop-heavy audiences (developer servers, homework / school servers, productivity Discords, streamer communities watching on a second monitor). For general community announcements where most viewers will be on phone, plain Discord markdown — bold, italic, spoiler — reads consistently across devices. Our Discord text formatter handles the mobile-safe markdown variants.

Practical patterns for streamer Discords

Three uses dominate streamer Discord adoption of colored text. One, announcement headers — a Yellow-on-Dark-Blue title block stands out in a busy announcements channel and survives the eye-skim. Two, sub goal thermometer text — a Green "ON TRACK" / Red "OFF PACE" / Yellow "WATCH" status string in a #goals channel updated daily. Three, schedule callouts — colored days inside a weekly schedule code block (Monday Cyan, Wednesday Yellow, Friday Pink) for visual rhythm. The generator's bold + foreground combination is enough for all three; backgrounds are best reserved for "alert" status indicators where the contrast helps the message pop on dense scrollback.

Why Discord doesn't formally document ANSI support

ANSI in Discord code blocks was confirmed by Discord engineers in 2022 but isn't part of Discord's formal markdown spec. Discord support has answered occasional forum questions confirming the feature is intentional, but they don't publish a colors reference and don't commit to back-compat in API docs. The palette has held through every desktop redesign since. If Discord ever did remove ANSI parsing, the graceful fallback is the same monochrome rendering mobile already produces — so the downside is bounded. For Twitch chat, none of this applies — Twitch has its own per-user name-color system in the chat client. To name your Twitch handle and check availability, see our Twitch name generator.

Frequently asked

How do I add color to text in Discord?
Discord supports ANSI escape codes — but only inside a code block opened with ```ansi. Plain text doesn't accept color formatting; the ```ansi fence at the top is mandatory. The escape sequence format is \u001b[<code>m where <code> is one of Discord's 8 foreground (30-37) or 8 background (40-47) ANSI numbers, plus optional 1 (bold) and 4 (underline). Mobile Discord clients ignore the codes and render plain monochrome — colors are desktop and browser only.
What colors does Discord support?
Eight foreground colors and eight background colors. Foreground (text): Gray (30), Red (31), Green (32), Yellow (33), Blue (34), Pink (35), Cyan (36), White (37). Background: Firefly Dark Blue (40), Orange (41), Marble Blue (42), Greyish Turquoise (43), Gray (44), Indigo (45), Light Gray (46), White (47). Discord uses the Solarized palette under the hood, which is why the colors look slightly muted compared to terminal-default ANSI. There are no other color modes — 256-color and true-color codes render as plain text.
Can I use color in regular Discord messages or just code blocks?
Code blocks only. The ```ansi fence is required. A plain message containing the same escape sequence renders the literal characters (you'll see "[1;31m" in the message instead of red text). The trade-off is that your message looks like a code block — monospace font, dark surface, slightly indented. For decorative text in regular messages, use Discord markdown — bold (**), italic (*), strikethrough (~~), spoiler (||) — handled by our companion <a href="/free-discord-text-formatter">Discord text formatter</a>.
Why does my colored text appear gray on mobile Discord?
Discord's iOS and Android clients don't parse ANSI escape codes inside code blocks, so the text renders in the default code-block monochrome (a muted gray) instead of in colour. Desktop Discord (Win / Mac / Linux), Discord Web in a browser, and Discord PWA all render the colors correctly. Mobile is a substantial share of Discord usage — colored text is best for desktop-heavy creator Discord servers and developer / homework-help servers; community Discords with mostly mobile users get less value from it.
Can I combine bold + color + background?
Yes. Combine codes with semicolons inside a single escape sequence: \u001b[1;31;40m means bold + red foreground + dark blue background. Order doesn't matter — \u001b[40;1;31m produces the same render. Always close with \u001b[0m to reset back to default. The generator above does the combining automatically — toggle bold + underline checkboxes and pick foreground / background swatches; the code-block textarea below shows the assembled escape sequence.
Why does Yellow look different from Red Yellow on my screen?
Discord renders ANSI foreground colors close to the Solarized palette (Solarized was designed for low-eyestrain reading on a dark surface). Solarized Yellow is a dark amber (#b58900) — close to brown — rather than the bright neon yellow (#FFFF00) that VT100-style terminals use. Discord's background colors are a custom Discord-specific palette (the names "Firefly Dark Blue", "Marble Blue", "Greyish Turquoise" are Discord conventions, not standard ANSI names). The swatches in the generator above match Discord's actual rendering.
Will Discord ever break or remove ANSI colors?
Unlikely. The feature has been stable since Discord rolled it out in 2022 — discovered by the community in late 2021 and shipped as a supported (if undocumented) parser path the following year. Every desktop redesign since has preserved ANSI in code blocks. There is no "official" ANSI documentation from Discord; the feature is supported on a "we won't break it but we won't formally document it" basis. If Discord did remove it, the fallback is monospace gray text inside the code block (the same way mobile already renders today).
Can I use 256-color or RGB true-color?
No. Discord only parses the standard 16-color ANSI subset (8 foreground + 8 background, plus bold and underline). 256-color codes (\u001b[38;5;<n>m) and 24-bit true-color codes (\u001b[38;2;<r>;<g>;<b>m) render as plain text — Discord doesn't parse them. The 8-color limit is intentional from Discord's side; expanding it would mean writing a fuller terminal renderer, which they've avoided since the feature is informally supported anyway.