Advanced formatting and gradients for Discord code blocks.
Random gradient per word
Copied!
Copied!
A Guide to ANSI on Discord
Discord supports sending colored messages within code blocks. It uses standard ANSI color codes, similar to printing colored text in a developer terminal.
How It Works
To format text, you wrap it in an ansi language code block and use specific escape sequences before your text:
\u001b[{format};{color}m
Important: The Escape Character
\u001b represents the literal Escape character (ESC). Discord's markdown engine now natively parses the text \u001b inside ansi codeblocks, so you can safely copy the outputs from this generator exactly as they are written!
Always reset the color back to normal at the end of your string using \u001b[0m.
Formats
0 : Normal (Reset)
1 : Bold
4 : Underline
Text Colors
30 : Gray
31 : Red
32 : Green
33 : Yellow
34 : Blue
35 : Pink
36 : Cyan
37 : White
Backgrounds
40 : Black
41 : Red
42 : Green
43 : Yellow
44 : Blue
45 : Pink
46 : Cyan
47 : White
RGB / True Color
Discord also supports full 24-bit RGB colors for text (but not backgrounds). This generator uses this feature for gradients:
\u001b[38;2;R;G;Bm
ANSI Colors Showcase
Visual preview of standard ANSI format combinations rendered in Discord's dark theme.
Images are scaled down drastically. Discord limits messages to 2000 characters.