How to Make Colored Text in Discord

Normal Discord messages have no text color option. The one way to get color is a code block marked as ANSI, a format terminals have used for decades, which the Discord desktop app and website both understand.

Discord · 4 min read · By Chris Lenga · Updated

The ansi code block

Open a code block with ```ansi on its own line, put your text inside, and close it with three backticks. Inside the block, color codes switch styles on and off. Leave out the word ansi and Discord shows the codes as plain text.

How a color code is written

Each code starts with the escape character, an invisible control character no keyboard types, followed by [, one or more numbers, and m. Written out, \u001b[31m turns the text after it red and \u001b[0m resets everything. Numbers can be joined with semicolons, so \u001b[1;34m is bold blue.

Because the escape character is so hard to type, the Discord Colored Text Generator puts it in for you and copies a block that is ready to paste.

The codes

Styles: 0 resets, 1 is bold, and 4 underlines. Text colors run from 30 to 37: gray, red, green, yellow, blue, pink, cyan, and white. Background colors run from 40 to 47: dark blue, orange, marble blue, grayish turquoise, gray, indigo, light gray, and white.

Where it works

Colors show in the Discord desktop app and in the browser. Many mobile versions show the same block as plain text inside a code block, so write colored messages that still make sense without the color.

FAQ

Why is my Discord colored text not working?+

Usually the block does not start with ansi straight after the three backticks, or the escape character was lost when the text was copied, which leaves a visible [31m behind. Copy it again from the generator, and check on desktop or in the browser.

Can I change the color of my name in Discord?+

Your name takes the color of your highest role that has one, and roles are set by the server’s admins. Some servers let members pick a color role for themselves.

Try the tools

All guides →