Discord Colored Text Generator
Color Discord messages with ANSI codes, rainbow highlights & ||spoiler|| wrap—plus live 2,000-char limit tracking.
Discord ANSI preview
117 / 2000 chars · Safe for DiscordRAID ALERT: Boss spawns at 9PM! Bring potions & check #rules
Desktop & Web color block (+45 hidden ANSI bytes)
8 Text Colors, 8 Backgrounds, Bold/Underline, Spoiler & Themes
Tip: Select part of the text above to color specific words, or tap any color without a selection to style the whole message.
Discord ANSI Color Codes Cheat Sheet (8 Text, 8 Background & Formats)
Discord’s ```ansi code blocks render a fixed Solarized-based subset of ANSI escape codes: 8 foreground colors (30–37), 8 background highlight colors (40–47), and 3 format codes (0, 1, 4). Every code below matches the live generator above.
| Color | Code | Escape Sequence | Best For |
|---|---|---|---|
| Dark Gray | 30 | \u001b[0;30m | Muted timestamps, footnotes, or secondary labels |
| Red | 31 | \u001b[0;31m | Rule warnings, raid alerts, and error notices |
| Green | 32 | \u001b[0;32m | Online status, patch additions, and confirmations |
| Gold / Yellow | 33 | \u001b[0;33m | Event times, VIP highlights, and caution callouts |
| Blue | 34 | \u001b[0;34m | Channel references, links, and info headers |
| Pink / Magenta | 35 | \u001b[0;35m | Giveaways, role perks, and creative banners |
| Cyan / Teal | 36 | \u001b[0;36m | Bot commands, code snippets, and tips |
| White | 37 | \u001b[0;37m | High-contrast body text on dark ANSI backgrounds |
| Highlight BG | Code | Escape Sequence | Contrast Pairing |
|---|---|---|---|
| Firefly Dark Blue | 40 | \u001b[0;40m | Deep slate badge behind White, Gold, or Cyan text |
| Orange | 41 | \u001b[0;41m | High-urgency alert pill—pair with White (37) |
| Marble Blue | 42 | \u001b[0;42m | Muted teal-slate highlight for section tags |
| Greyish Turquoise | 43 | \u001b[0;43m | Soft neutral highlight for schedule headers |
| Gray | 44 | \u001b[0;44m | Mid-gray strip—pair with Dark Gray (30) or White (37) |
| Indigo | 45 | \u001b[0;45m | Discord-style blurple highlight—pair with White (37) |
| Light Gray | 46 | \u001b[0;46m | Light badge—pair with Dark Gray (30) for legibility |
| White | 47 | \u001b[0;47m | Cream-white banner—pair with Dark Gray (30) or Red (31) |
Reset / Normal
\u001b[0mClears active color, background, bold, and underline back to default
Bold
\u001b[1;31mThickens stroke weight; combine with any 30–37 or 40–47 color code
Underline
\u001b[4;34mAdds underline; combine with Bold as 1;4 for emphasized headers
| Code Block | Colors Available | Prefix Symbols | Mobile App Support | Best Use Case |
|---|---|---|---|---|
| ```ansi | 8 text + 8 background + bold + underline | No visible prefix symbols (uses invisible ESC) | Plain code block (no color on iOS/Android) | Multi-color announcements, rainbow text & spoiler reveals |
| ```diff | Green (+), Red (-), Gray (---) | Yes (+ or - at start of each line) | Works on desktop & mobile (limited to 2 colors) | Quick patch notes or pros/cons lists on mobile |
| ```yaml | Cyan keys + white/blue values | Key: Value colon structure | Works on desktop & mobile | Server info cards & bot config tables |
| ```ini | Blue inside [brackets] | Must keep [ ] brackets visible | Works on desktop & mobile | Short blue section titles without ESC codes |
| ```fix | Single gold/yellow color only | None (entire block colored) | Works on desktop & mobile | Single-color yellow warnings with zero extra bytes |
Hidden Escape Overhead: Why Short Colored Messages Hit the 2,000-Char Cap
Discord counts every invisible \u001b[1;31m reset and color code toward your 2000-character standard message limit. Changing colors on every single letter multiplies payload size by 7x–9x, while word-level rainbow or phrase-level blocks stay compact.
Visible Text
Hidden ANSI Escapes
Wrapper (```ansi / ||)60 visible + 11 ANSI escapes + 12 wrapper = 83 / 2000 standard cap
60 visible + 45 ANSI escapes + 12 wrapper = 117 / 2000 standard cap
162 visible + 1046 ANSI escapes + 16 wrapper = 1224 / 2000 standard cap
Measured directly by our ANSI engine: a 1-color alert uses 83 total chars (11 escape bytes), a 4-segment announcement uses 117 chars, while a 162-character per-letter rainbow with spoiler jumps to 1224 chars—consuming over half of Discord’s 2,000-character budget.
ANSI Colored Text vs. Syntax Highlighting vs. Unicode Fonts
Each Discord styling method has strict boundaries. Use this decision checklist to avoid broken mobile blocks or rejected profile fields.
Decision boundary: Desktop multi-color chat vs. mobile-safe styling
Choose ```ansi colored text for rich desktop server announcements, raid alerts, and spoiler reveals where multiple colors and background badges matter. If most of your members read on iPhone or Android and you only need red/green lines, use ```diff syntax highlighting—or switch to Unicode styling in our Discord Gothic Text Generator so your text renders identically on desktop and mobile.
Hidden pitfall: iOS and Android render ANSI blocks as plain monospace
Discord’s mobile apps strip ANSI color styling inside ```ansi blocks and display plain gray code text instead. Switch our preview to Mobile Fallback above to verify your message still reads clearly without color cues (avoid writing “follow the red text”).
Hidden pitfall: Spoilers hide the entire code block, not one word
Because Discord does not parse ||spoiler|| tags inside a fenced code block, wrapping colored text in a spoiler requires placing || outside the fences (||```ansi ... ```||). Use our built-in Spoiler toggle so the tags never break your color escapes.
When ANSI colored text is not the right fit
ANSI escape codes only work inside Discord chat messages and webhook embeds—they cannot color Discord usernames, server names, channel titles, role names, or About Me bios, and they do not work on Instagram or X. For stylized cross-platform bios and handles, use our Gothic Instagram Font Generator or Gothic Twitter / X Text Generator. For playful coded or eerie chat gimmicks, try our Enchanting Table Translator or Cursed Text Generator.
Style Discord profiles, mobile bios & gaming chats
Need stylized text that works on Discord mobile, usernames, server channels, or other platforms? Continue in the same silo:
Discord colored text & ANSI FAQ
Direct answers on typing in color on Discord, using ```ansi code blocks, rainbow and spoiler formatting, mobile compatibility, and the 2,000-character limit.
Can I do colored text in Discord?
Yes—you can send colored text on Discord Desktop and Web by wrapping ANSI escape codes inside a triple-backtick ```ansi code block. This generator adds the invisible \u001b escape sequences automatically so you can paste directly into any server channel or DM without bots or Nitro.
What is ``` (triple backticks) in Discord and how does ```ansi work?
Triple backticks (```) create a multi-line code block in Discord, and typing ansi right after the opening backticks tells Discord to render standard 30–37 text colors, 40–47 background highlights, bold (1), and underline (4). Plain Markdown like **bold** does not work inside code blocks, so ANSI escape codes handle both color and text styling.
How do I make rainbow text or add a ||spoiler|| to colored Discord text?
Tap Rainbow Text above to cycle words across 6 bright ANSI colors (Red, Gold, Green, Cyan, Blue, Pink) while keeping escape-byte overhead low, then toggle ||Spoiler|| Wrap inside the options panel. Our tool places the || tags outside the ```ansi fences so Discord hides the entire colored block until clicked.
Does Discord colored text work on iPhone and Android mobile apps?
No—Discord mobile apps currently ignore ANSI escape codes inside ```ansi blocks and display plain gray monospace text instead. Use our Mobile Fallback preview to check readability, or switch to ```diff syntax highlighting (green/red) or Unicode fonts from our Discord Gothic Text Generator when mobile visibility matters.
Why did my short colored message hit Discord’s 2,000-character limit?
Discord counts every hidden ANSI escape sequence (7–14 characters per color change plus 4 characters for each reset) toward the 2,000-character standard cap (4,000 with Nitro). Styling whole phrases or using word-level rainbow instead of per-letter color swaps saves hundreds of characters—and our live meter warns you before you copy.
Can I use ANSI colored text in Discord usernames, roles, channels, or bios?
No—ANSI code blocks only render inside chat messages and webhook embeds, never in usernames, server names, channel titles, role names, or About Me profiles. To customize those profile fields across desktop and mobile, use copy-and-paste Unicode styles in our Discord Gothic Text Generator.