How Discord ANSI color text works
Discord supports a small subset of ANSI escape codes inside ```ansi code blocks on desktop and the web client. By wrapping your text in an ANSI escape sequence (for example \u001b[1;34m for bold blue), Discord renders it with foreground color, background color, bold and underline formatting. Mobile clients fall back to plain text inside the code block.