Discord ANSI Color Codes — Complete 2026 Guide
The complete guide to Discord ANSI color codes. Every color, background, and text style with copy-paste examples.
How Discord ANSI Colors Work
Discord renders ANSI escape codes inside ```ansi code blocks. Wrap your text with escape sequences (ESC[CODEm) to add colors and styles. The Discord Colors tool generates the correct format automatically.
Complete Color Reference
Text colors (30-37): 30=Dark Gray, 31=Red, 32=Green, 33=Yellow, 34=Blue, 35=Magenta, 36=Cyan, 37=White. Background colors (40-47): 40=Dark Background, 41=Orange-Red, 42=Gray, 43=Light Gray, 44=Lighter Gray, 45=Blurple, 46=Light Gray 2, 47=Cream.
Combining Colors and Styles
Use semicolons to combine codes: ESC[1;32m = Bold Green. ESC[4;33m = Underline Yellow. ESC[1;31;42m = Bold Red on Gray Background. Always end with ESC[0m to reset formatting.
ANSI Colors on Mobile
Discord iOS and Android render ANSI colors in code blocks. Update to the latest Discord version if colors appear as plain text. Some older Android WebView-based clients may not support ANSI rendering.
Do ANSI colors work in Direct Messages?
Yes. ANSI color code blocks work identically in DMs, group DMs, and all server channels.
Can server admins disable ANSI colors?
No. ANSI rendering is a Discord client feature, not a server-configurable permission. It works for all users regardless of server settings.