●Free AI Tools, Tech Guides & How-Tos
Explore Tools
How-To Guides

How to Make Colored Text in Discord: 2 Methods (2026)

October 22, 2026
Discord chat window showing red, green, yellow and cyan colored text inside code blocks — guide to colored text in Discord

To make colored text in Discord, send your message in a triple-backtick code block with a language tag — a ```diff block with - red text renders in red. There is no built-in color button: color comes from code-block syntax highlighting or ANSI codes, and works only in chat messages. This Zyrro guide covers both methods and every color code.

Colored text is normal text inside a Discord code block that Discord’s syntax highlighter — or its ANSI renderer, added in 2022 — paints in color. Below: the quick answer, full color tables for both methods, a comparison, mobile behavior, and fixes for common mistakes.

Table of Contents

How do you make colored text in Discord?

You make colored text in Discord by wrapping your message in a triple-backtick code block with a language tag, then typing your text with the marker that language’s highlighter colors. The fastest example: type ```diff, press Enter, type - This is red on one line and + This is green on the next, close with ```, and send.

The two methods that work in 2026: the syntax-highlight trick (easy, a handful of fixed colors) and ANSI escape codes (more colors and backgrounds, but you have to copy an invisible character).

Important to know up front: Discord has no native color picker, and color only appears inside code blocks in chat messages — never as inline colored words, and never in profile bios or nicknames.

How do I make red, green, blue, or yellow text in Discord?

Use the syntax-highlight method. Discord colors code blocks with a library called Highlight.js — start your block with a language name and you borrow its coloring. Each language paints text differently, so you pick the one that gives the color you want.

The syntax:

```diff
- This text appears red
+ This text appears green
```

The opening backticks and the word diff must be on the same line with no space between them. Close the block with three backticks on their own line.

The full color table for this method:

ColorLanguage tagHow to type itExample
ReddiffStart the line with - (hyphen + space)```diff
- This is red```
GreendiffStart the line with + (plus + space)```diff
+ This is green```
Yellow / goldfixNo marker needed```fix
This is yellow```
BlueiniWrap text in square brackets [ ]```ini
[This is blue]```
CyanjsonWrap text in double quotes " "```json
"This is cyan"```
OrangecssWrap text in square brackets [ ]```css
[This is orange]```
YellowyamlNo marker needed```yaml
This is yellow```
GreenbashNo marker needed```bash
This is green```

Tip: red is by far the most-searched color — a diff block with a leading - is the quickest way to make red text in Discord.

Other tags (such as tex, elm, or lua) appear in older guides, but their colors vary between Discord versions — test them yourself before relying on them.

Three code blocks showing the Discord syntax-highlight color trick — diff for red and green text, fix for yellow text, ini for blue text

What are Discord ANSI color codes?

Discord ANSI color codes are escape sequences inside a code block tagged ansi that color individual words, mix colors in one block, and set backgrounds. Discord added ANSI support in 2022, using the Solarized palette — 9 text colors, 9 backgrounds, plus bold and underline combinations.

The catch: each sequence starts with the invisible ESC character (U+001B), which no keyboard can type — that is why colored-text generators exist: pick colors visually, copy the block, paste it into Discord.

The structure ([ESC] = the invisible character you copy, not type):

```ansi
[ESC][1;31m This is bold red text [ESC][0m
```

The color number sits between [ and m, and [ESC][0m at the end resets formatting so the rest of the block is not tinted.

Discord’s ANSI text color codes:

ColorCodeBold version
Gray301;30
Red311;31
Green321;32
Yellow331;33
Blue341;34
Pink351;35
Cyan361;36
White371;37

Use 1; for bold and 4; for underline before the color number (4;34 = underlined blue); backgrounds use 40–47. Practical workflow: build the block in a generator, copy the whole thing, paste it into Discord, send.

Which method should I use: syntax highlighting or ANSI?

Use syntax highlighting (Method 1) when you want one or two colors fast with zero setup — a red warning line or a green announcement takes seconds to type by hand. Use ANSI codes (Method 2) when you need precise control: multiple colors in one block, backgrounds, bold or underlined colored text, or pink, which the highlight trick cannot produce.

Method 1: Syntax highlightingMethod 2: ANSI codes
Typing effortType by hand — easyMust copy the invisible ESC character
Colors~8 fixed colors9 text + 9 background colors
Bold / underlineNoYes (1; / 4;)
Multiple colors per blockLimited (diff gives red + green)Yes — any mix
Mobile supportShows as a monochrome code block on most phonesSame — unreliable on mobile
Best forQuick red/green/yellow/blue linesStylized announcements, pink/purple text

How do I make rainbow or pink text in Discord?

For pink or rainbow text, use the ANSI method: only ```ansi blocks support pink (35) and mid-block color changes. The syntax-highlight trick has no pink, and its palette is fixed per language tag.

A rainbow-style block looks like this (again, [ESC] is the invisible character you copy from a generator, not something you type):

```ansi
[ESC][31mRed [ESC][33mYellow [ESC][32mGreen [ESC][36mCyan [ESC][34mBlue [ESC][35mPink[ESC][0m
```

Each color switch is its own [ESC][NNm sequence, and the final [ESC][0m resets everything. Nobody hand-types rainbow blocks — build them in a generator, copy the output, and paste it into Discord.

Desktop monitor rendering colored Discord text next to a phone showing the same message in plain gray — colored text in Discord mobile limits

How do I make colored text in Discord mobile?

Colored text in Discord mobile (iPhone and Android) is unreliable: the phone apps have rendered ANSI color blocks inconsistently, and syntax-highlight colors frequently show as plain monochrome code blocks. The syntax itself is identical on mobile — triple backticks are under the symbols keyboard on both iOS and Android — but expect many mobile readers to see your message without colors.

The fallback is graceful — the block stays readable, just gray. Never let color carry meaning alone: if posting “red = cancelled, green = confirmed”, also write the words out.

For colorful text in a username or bio instead of a chat message, the color trick cannot help — it only works inside code blocks. Our Fancy Text Generator is the better tool there: it produces styled Unicode text (bold, script, circled letters) that renders everywhere, including bios and nicknames.

Can I use colored text in my Discord bio or nickname?

No. Colored text only works inside triple-backtick code blocks in chat messages, and Discord profiles, “About Me” bios, nicknames, and channel names do not render code blocks at all. Pasting a color block into your bio shows the raw backticks and tags as plain text — the colors never appear.

For profile customization, use styled Unicode text instead: our Fancy Text Generator creates bold, italic, script, and decorative letter styles that work in bios, nicknames, and status messages. If you already know how to make text bold in Discord or italicize text in Discord, those markdown tricks also work in many profile fields — color is the one effect locked to code blocks.

Why isn’t my colored text working in Discord?

Colored text fails for a small set of repeatable reasons. Check them in this order:

  1. The language tag is wrong. It must be exactly ansi, diff, fix — lowercase, no quotes, no space after the opening backticks. ```Diff will not color anything.
  2. You retyped the ANSI block instead of copying it. The ESC character is invisible and cannot be typed. If you rebuilt an ANSI block by hand, the escapes are missing — always copy the whole block from a generator.
  3. You are reading it on mobile. Phone apps render colored blocks inconsistently. Check the same message on desktop or the web app before assuming the syntax is broken.
  4. Spaces in the wrong place. In diff blocks the marker needs a hyphen or plus plus a space (- text); in ini/css the brackets must wrap the text with no leading space.
  5. You pasted it somewhere code blocks do not render. Bios, nicknames, embeds, and channel topics will not show colors — only chat messages.
  6. Theme or client quirk. Rarely, a Discord client update or custom theme dulls highlight colors. Sending the same block from the web app is a quick way to rule this out.

If you are learning the rest of Discord’s formatting alongside colors, our complete Discord text formatting guide covers strikethrough text in Discord and spoiler text in Discord too.

Want underlined text to go with your colored messages? Try our free underline text generator — 15 Unicode underline styles you can copy and paste anywhere.

Frequently Asked Questions

How do you color text in Discord?

Wrap your message in a triple-backtick code block with a language tag — for example ```diff with - for red or + for green — or use an ```ansi block with ANSI escape codes for full color control. There is no built-in color button; both methods borrow color from code-block rendering, and both only work inside chat messages.

Can I make colored text in Discord without Nitro?

Yes. Colored text has nothing to do with Nitro — both the syntax-highlight method and ANSI codes work on free accounts on desktop and web. Mobile apps render the colors inconsistently regardless of Nitro status, so this is a platform limitation, not a paywall.

What is the easiest way to make red text in Discord?

Type ```diff, press Enter, type - Your text here, close with ```, and send. The leading hyphen makes the whole line render red. It takes five seconds, works by hand with no generator, and is the most reliable single-color trick in Discord.

Do colored-text generator tools work?

Yes — generators exist precisely because the ANSI method needs the invisible ESC character (U+001B), which no keyboard can type. You pick colors in the tool, copy the generated ```ansi block, and paste it into Discord. Paste the entire block exactly as generated; retyping any part of it strips the escape characters and breaks the colors.

How do I get colored text in my Discord bio?

You cannot — Discord bios, nicknames, and channel names do not render code blocks, so color tricks never display there. For profile styling, use Unicode-based styled text instead, which renders everywhere. Our Fancy Text Generator produces bold, script, and decorative styles designed exactly for bios and usernames.

Why does my colored text look gray on my phone?

Discord’s mobile apps have rendered colored code blocks inconsistently — many phones show them as plain monochrome blocks while desktop shows the full colors. The message itself is fine; the color is simply not displayed on that device. Never rely on color alone to convey meaning when your audience reads on mobile.

Conclusion

Colored text in Discord is a two-method trick: the quick syntax-highlight route (diff, fix, ini, json) for everyday red, green, yellow, and blue lines, and ANSI code blocks for full control — pink, backgrounds, bold, and rainbow effects. Remember the limits: code blocks only, chat messages only, and mobile readers may see gray. Master those, and your announcements and server rules will never blend into the chat again — exactly the kind of practical skill Zyrro’s Discord guides are built to teach.

Scroll to Top