Discord Colored Text Generator

A free tool that turns plain text into colored Discord messages. Type your message, select the words you want to color, then copy and paste one ANSI code block into any Discord channel - desktop or mobile. No Nitro required.

Create your text

Classic
Custom
Effects
Welcome to Discord Colored Text Generator!
0 / 2000

Select some text first, then choose a color.

How to use it

  1. Type or paste your message: Start from the sample text or replace it with the message you want to send in Discord.
  2. Select the words to color: Highlight a word, a phrase, or the whole message. Nothing selected? The tool asks you to select something first, so nothing changes by accident.
  3. Pick a color or style: Choose Foreground or Background and click a swatch. Bold, Italic, Line and Strike stack on the same selection, and the Effects row paints a gradient across it.
  4. Copy the block: Press Copy text as Discord formatted. You get a complete ansi code block with the invisible ESC characters already in place, ready to paste.
  5. Paste it into Discord: Paste into any Discord message box and send. The colors render for everyone on desktop, in the web app and on mobile.

Discord ANSI color codes

These are the codes this generator writes for you, so you never have to type them by hand. ESC stands for the invisible escape character (0x1B) - it tells Discord that what follows is formatting rather than text. Every color code needs the 2; prefix to render in Discord.

ColorText colorBackground colorHexCopy
BlackESC[2;30mESC[2;40m#2a2d32
RedESC[2;31mESC[2;41m#ed4245
GreenESC[2;32mESC[2;42m#57f287
YellowESC[2;33mESC[2;43m#fee75c
BlueESC[2;34mESC[2;44m#5865f2
PinkESC[2;35mESC[2;45m#eb459e
TealESC[2;36mESC[2;46m#1abc9c
WhiteESC[2;37mESC[2;47m#dcddde

Text style codes

StyleCodeCopy
Reset all formattingESC[0m
BoldESC[1m
ItalicESC[3m
UnderlineESC[4m
StrikethroughESC[9m

Any color (24-bit truecolor)

Outside the eight palette colors, Discord also accepts 24-bit values: ESC[38;2;255;0;0m paints pure red text and ESC[48;2;255;0;0m paints a pure red background. The Custom row of the generator writes exactly these sequences.

Every sequence ends with ESC[0m so the formatting does not leak into the rest of your message. Because these codes are ordinary characters, they also count toward Discord's 2000-character limit.

See the full ANSI code reference with combination examples →

How to make rainbow text in Discord

Rainbow text is the most requested Discord color effect, and it is just a gradient of 24-bit truecolor codes - one per character. You never have to write them by hand: the Effects row paints them for you.

  1. Select the phrase: Highlight the words you want to paint. Gradients spend roughly 20 characters of your message budget per letter, so a short phrase renders better than a whole sentence.
  2. Click the rainbow swatch: It is the first swatch in the Effects row. Switch to Background first if you would rather paint the highlight behind the text than the letters themselves.
  3. Copy and send: The generator samples the gradient across the selection and writes ESC[38;2;r;g;bm before every character, so the hue shifts smoothly from red through violet.

Sunset and Candy stripes work the same way - Sunset blends warm peach into rose, while Candy alternates two pinks for a striped look. All three are plain ANSI sequences, so they render anywhere Discord renders colors.

How to copy and paste colored text into Discord

Colored text travels as ordinary characters, which means you can copy it out of Discord, keep it in a note, or paste the same block into several channels - the colors come along every time.

  1. Copy the whole block: Use the Copy text as Discord formatted button rather than selecting the text by hand. It includes the ```ansi opening fence, and without that fence Discord prints the raw escape characters.
  2. Paste into the message box: Click into any Discord channel or DM and press Ctrl+V (Cmd+V on macOS). The block keeps its monospaced look while you are still editing it.
  3. Send it: Press Enter. Discord swaps the raw block for rendered colors - you will see the styling applied the moment the message lands in the channel.
  4. Reuse it anywhere: Anyone who copies your message also copies the escape characters, so reposting a colored message from another server keeps the formatting intact.

On mobile, long-press the message box and choose Paste. Current Android and iOS clients render the same colors as desktop; if you only see odd characters, update the app first.

What are ANSI color codes?

Discord understands a small subset of ANSI escape sequences - the same control codes terminals have used for decades to colorize output. When you wrap text in a code block tagged with the language ansi, the Discord client interprets those sequences instead of printing them.

A color sequence looks like ESC[2;31m, where ESC is the escape character, 2 selects the color set Discord expects and 31 means red. Everything after it stays red until a reset sequence (ESC[0m) or a new color appears, which is why generated code always ends with a reset.

Because the colors are just characters, they travel with your text and anyone who copies the message gets the same colors. No Nitro subscription, no bot and no third-party app is involved.

Tips for better looking colored text

  • Keep it short. Every escape sequence adds invisible characters, so a short punchy line renders more reliably than a long paragraph.
  • The Classic row uses Discord's own eight-color palette and has the widest client support. Custom colors are written as 24-bit values, and recent clients render those too.
  • Use background colors sparingly. One highlighted word stands out far more than a full block of colored text.
  • Gradients are painted one character at a time, so they look best on short phrases rather than whole paragraphs.

Frequently asked questions

Can I do colored text in Discord?

Yes. Discord renders ANSI escape codes inside a code block that is tagged with the language ansi. Open the block with three backticks followed by ansi, put the escape sequences and your text inside, close it with three more backticks, and the colors appear the moment you send the message. No Nitro, bot or third-party app is involved, and the colors are visible to everyone in the channel.

Is there a text color generator for Discord?

Yes - this page is one. A Discord text color generator writes the escape sequences for you so you never have to type invisible control characters by hand. Type your message, select the words you want to color, pick a swatch, and copy the finished ansi code block. If you would rather write the codes by hand, the Discord ANSI color codes reference lists every one of them.

What are the Discord colored text codes?

Discord reads ANSI escape sequences inside a code block tagged ansi. Text colors use ESC[2;30m through ESC[2;37m, background colors use ESC[2;40m through ESC[2;47m, and ESC[0m resets the formatting. Styles are ESC[1m bold, ESC[3m italic, ESC[4m underline and ESC[9m strikethrough. The full list is in the reference table above.

What is ``` in Discord?

Three backticks open and close a code block in Discord, and they stop Discord from applying markdown to whatever sits between them. Adding a language name straight after the opening fence turns on syntax highlighting - and ansi is the special one: it makes Discord interpret ANSI escape sequences instead of printing them, which is how colored Discord text is produced. So ```ansi is the fence you need for colored text, and ``` on its own just gives you a plain monospaced block.

How do you make rainbow text in Discord?

Select the phrase you want to paint, click the rainbow swatch in the Effects row, then press Copy text as Discord formatted. The tool samples a gradient and writes one 24-bit truecolor escape sequence per character, so the colors flow smoothly from red through to violet. Because every character carries its own code, rainbow text uses noticeably more of Discord's 2000-character limit than a single flat color - keep it to a short phrase.

Can I copy and paste colored text into Discord?

Yes, that is exactly what the tool is for. Press Copy text as Discord formatted and paste the whole block - including the ansi code fences - into any Discord message box. The colors appear the moment you send it, and anyone who copies your message keeps them. If a message you received looks colored, copying it and pasting it elsewhere in Discord preserves the colors too.

Does colored text work on Discord mobile?

Yes. Current Android and iOS clients render ANSI colors, so text colored here looks the same on a phone as it does on the desktop app. If an older client shows raw characters instead, updating the app usually fixes it.

Is it free, and do I need Discord Nitro?

It is completely free and no account is required. Nitro is never needed either - the colors come from ANSI escape codes inside a code block, which Discord renders for every account on every platform.

Why do I see strange characters instead of colors?

The block you paste has to be a code block tagged ansi. If you copy only the inner text without the fence, Discord prints the raw escape characters instead of rendering them. Use the copy button so the fence is included. The same thing happens if the message was forwarded through a client that stripped the escape characters.

Do the color codes count toward the message limit?

They do. Every escape sequence is a real character, so a heavily styled message uses part of Discord's 2000-character budget - a rainbow phrase spends roughly 20 characters per letter. The counter inside the editor shows the exact total before you copy.

Is my text uploaded anywhere?

No. The editor and the escape-sequence generator both run locally in your browser and nothing is sent to a server, so private drafts never leave your device.