Discord Creator Asset StudioAsset Studio
Tutorials⏱ 6 min read•Updated 2026-10-04

How to Do Colored Text in Discord

Discord does not provide a native color picker button, but you can tint text using ANSI terminal escape sequences inside triple-backtick code blocks. Here is how the syntax works, the 16-color palette, and how to copy ready-to-paste blocks without memorizing control codes.

AS
Discord Asset Studio Engineering
Client Architecture Specialist

Why Discord Chat Uses ANSI Codes Instead of a Color Picker

Discord chat does not include a color picker button or rich-text palette in its interface. While you can easily type asterisks for bold or italics, tinting text requires terminal escape codes inside an ansi syntax fence.

When Discord added ANSI terminal styling to desktop and web builds, it gave community moderators, bot developers, and creators a way to highlight important announcements, build warning boxes, and create distinct status messages.

The technique relies on standard ANSI SGR (Select Graphic Rendition) sequences. When enclosed inside three backticks tagged with ansi, the Discord client parses the numbers and colors the text instead of rendering plain monospaced characters. To format your messages without typing control codes manually, use our in-browser Discord colored text generator. If you need standard markdown styling like bold or strikethrough, check out our Discord text formatting tool.

ℹ️ Note:The Basic ANSI Fence Pattern

Every colored message must start with ```ansi on its own line and end with ``` on its own line. Without the ansi tag, Discord treats your escape sequences as raw text.

The ANSI Escape Sequence Formula for Discord

An ANSI color command in Discord follows a strict pattern:

`` \u001b[{format};{color}m{your text here}\u001b[0m ``

Here is how each piece works: - \u001b (ESC): The non-printable ASCII escape character (code 27). Because modern keyboards have no key to type this character directly, you have to paste it from an editor or generate it using our tool. - [: The Control Sequence Introducer (CSI) bracket. - {format}: The text attribute code. 0 is normal text, 1 is bold, and 4 is underline. - ;: A semicolon separating the attribute from the color number. - {color}: The 2-digit integer for foreground text (30 through 37) or background highlight (40 through 47). - m: The terminator that tells Discord the code is complete. - \u001b[0m: The reset code. Always place this at the end of your colored phrase so subsequent words return to default gray.

ansiBasic 3-line ANSI colored text block in Discord
```ansi
This is red text
This is bold green text
This is underlined blue text
```

Complete Discord ANSI Color Code Reference

Discord implements a Solarized-style color palette rather than harsh neon primaries. This means green leans slightly olive, blue looks like soft denim, and yellow appears as warm gold.

You can set foreground text colors (codes 30-37) and background fill colors (codes 40-47). Here is the reference table of every available color in Discord:

Color NameText Code (FG)Background Code (BG)Visual Appearance in Discord
Dark Gray / Charcoal3040Dark slate tone, subtle contrast against dark theme
Red / Crimson3141Warm salmon red, ideal for warnings and alert tags
Green / Olive3242Earthy forest olive, perfect for success messages and online tags
Yellow / Amber3343Warm gold yellow, great for cautions and highlighted notes
Blue / Periwinkle3444Soft periwinkle blue, excellent for info callouts
Pink / Magenta3545Soft rose pink, popular for aesthetic headers
Cyan / Teal3646Vibrant aquamarine teal, high visibility in dark theme
White / Light Gray3747Clean off-white, strong contrast on dark backgrounds

Legacy Markdown Color Tricks vs Modern ANSI Blocks

Before Discord supported ANSI blocks, communities relied on language syntax highlighting hacks to introduce color into chat. While these tricks still work, they apply color to whole lines rather than specific words:

  • diff: Lines starting with + turn light green; lines starting with - turn light red.
  • ini: Text inside square brackets [Like This] turns bright blue; numbers turn orange.
  • css: Text preceded by a dot .selector or curly braces turns teal and blue.
  • yaml: Keys before a colon key: turn yellow; numbers turn cyan.

While syntax highlighting hacks are easy to type without escape codes, ANSI blocks are far more versatile. With ANSI, you can color a single word in the middle of a sentence, combine bold with underline, and even apply background fills. For complex layouts, try our Discord markdown editor.

markdownOlder syntax highlighting workarounds in Discord
```diff
+ Green line using diff syntax
- Red line using diff syntax
```

```ini
[Blue Header inside ini syntax]
```

Mobile App Support and Theme Considerations

Recent versions of Discord on both iOS and Android render ANSI colored text inside code blocks. However, members on older client versions will see the message as monospaced white text inside a gray box. The content remains completely readable, though without color.

Colors also look distinct depending on the viewer's theme: - Dark Mode (#313338): Cyan (36), yellow (33), and pink (35) offer the highest legibility. Dark gray (30) blends closely into the chat background and should be avoided for crucial text. - Light Mode (#FFFFFF): Red (31), blue (34), and dark gray (30) look crisp, while cyan and yellow can appear faint.

If you are setting up community rules or channel banners, pair colored text blocks with our Discord background color inspector to verify color contrast across both themes.

⚠️ Warning:Not Supported in Profiles or Bios

ANSI color codes only render inside message code blocks. They do not work in your username, server nickname, or About Me bio.

ANSI 16-Color • Code Blocks

Generate ANSI Colored Discord Text in Seconds

Pick colors, style words with bold or underline, and copy ready-to-paste ANSI code blocks formatted directly for Discord chat.

Open Colored Text Studio →

Frequently Asked Questions

How do you do colored text in Discord without Nitro?

You do not need Nitro. Colored text uses standard ANSI escape codes inside a triple-backtick ansi code block, which is available to all Discord users on desktop, web, and mobile.

Why is my Discord colored text showing raw escape codes like [31m?

This happens if you omit the ansi tag after the opening triple backticks, or if you accidentally deleted the invisible ESC character before the bracket. Use our colored text generator to copy a clean, validated block.

Can you use colored text in your Discord bio or About Me?

No. Profile bios and server nicknames only accept plain text and Unicode characters. Code block syntax does not render in user profiles.

Does colored text work on the Discord mobile app?

Yes, modern Discord updates on iOS and Android render ANSI colors. If a mobile user is on an older app release, the text simply displays as clean monospaced plain text.

What is the fastest way to write colored text in Discord?

Use our free in-browser Discord Colored Text Generator. Type your message, click your preferred color and style, and copy the formatted code block directly into Discord.

Related Discord Guides & Specs