How to Do Colored Text in Discord (ANSI Code Blocks)

Colored text in Discord is made with an ANSI code block. You type a short code block, add a special color code in front of your words, and Discord shows the text in red, green, blue and more. This guide shows how to do colored text in Discord step by step, which codes to use, what works on desktop and mobile, and the older tricks that still work.

Want to skip the typing? Use our Discord colored text generator. It builds the code block for you, and you only need to copy and paste it.

How Colored Text Works in Discord

Discord does not have a color picker for chat messages. Instead, it supports ANSI escape codes inside a code block that starts with the word ansi. An ANSI code is a hidden control character followed by a number. The number decides the color, and a reset code ends it.

Because the control character is invisible and hard to type, most people copy a finished block from a generator instead of typing it by hand.

How to Do Colored Text in Discord (Step by Step)

  1. Open the Discord colored text generator and type your message.
  2. Pick the text color, and a background color or bold if you want.
  3. Press the copy button. The output is a code block that starts with ansi.
  4. Paste it into any Discord channel or DM and press Enter.

The message appears as a code block with colored text inside it.

Discord ANSI Color Codes

Text colors

Background colors

Styles

Codes can be combined with a semicolon, for example 1;31 means bold red. Always end with a reset (0) so the rest of your text stays normal. For the full cheat sheet, see the table on our generator page.

Does Colored Text Work on Mobile?

ANSI colors are displayed reliably on Discord for desktop and in the browser. On mobile apps the text may appear white or without color, depending on the app version. If your friends use phones, send them a short test message first.

Other Ways to Format Text in Discord

If you do not need color, Discord’s built-in markdown covers most formatting:

Some older tricks use code block languages to get one color. A diff block shows lines that start with + in green and lines that start with – in red. These work without ANSI, but you cannot choose the exact color.

Why Is My Discord Colored Text Not Working?

Frequently Asked Questions

How do I do colored text in Discord?

Send a code block that starts with ansi and put an ANSI color code before your text. The easiest way is to copy a ready-made block from a generator.

Do I need Discord Nitro for colored text?

No. ANSI code blocks work for free accounts.

Can I change the color of my whole message?

Discord has no setting for that. Colored text lives inside a code block.

Why does the color look white on my phone?

Some mobile versions do not display ANSI colors. Check on desktop or in the browser.

Can I use colored text in my username?

No. ANSI colors only work inside messages, not in usernames or nicknames.

For bold, italic, strikethrough, spoilers and code blocks, see our Discord markdown cheat sheet.

Ready to try? Open the free Discord colored text generator and copy your block.