NapNodes
Free tool · Discord

Discord colored text generator

Rules in red, titles in yellow, a notice with a background: Discord paints them if the message goes in an ansi code block with some codes you can't type. Pick each piece's style here, see how it looks and copy the message ready to paste.

Write your text in pieces

Each piece has its own style. For a new line, press Enter inside the piece.

Piece 1
Piece 2
Piece 3
Piece 4
Piece 5
Piece 6
Piece 7
Piece 8

How it will look in Discord

SERVER RULES
1. Respect everyone.
2. No spam or advertising.
3. No griefing: instant ban, no warning.

The shades are approximate: each Discord version paints them slightly differently. On mobile the block may show up without colours.

170 of 2000 characters

For your bot

await interaction.reply("```ansi\n\u001b[0;1;33mSERVER RULES\n\u001b[0;1;36m1. \u001b[0mRespect everyone.\n\u001b[0;1;36m2. \u001b[0mNo spam or advertising.\n\u001b[0;1;36m3. \u001b[0;4;31mNo griefing\u001b[0m: instant ban, no warning.\n```");

It goes inside a slash command (interaction is the one from the interactionCreate event). The escape character is written as \u001b so it isn't lost when you copy it.

Already have one?

Want a bot to post the rules or announcements by itself? It has to be on all the time.

Host your bot for free

256 MB, Node.js or Python, no card. Renew it every 7 days with one click.

How to use it

  1. Write the text in pieces and give each one its colour, background, bold or underline. It starts with some example rules so you can see how they combine.
  2. Click “Copy for Discord”. The whole message is copied, with the block's backticks and the invisible characters.
  3. Paste it in the channel and send it. If you edit it in Discord, don't delete the first line (```ansi).

It all runs in your browser: nothing is sent anywhere.

Good to know

  • There are eight text colours and eight backgrounds: no free colour picker, unlike roles.
  • It shows in a code font (monospaced) inside a box: it's a code block.
  • A message holds 2000 characters and the codes count too; the counter above warns you if you go over.
  • On desktop it shows in colour; on mobile it may show without colours.

Frequently asked questions

How do you write in colour on Discord?

With a code block marked as ansi: three backticks, the word ansi and, before each piece of text, a colour code such as [31m preceded by an invisible escape character. You can't type that character, which is why you copy it from a generator like this one.

Which colours are there?

Eight text colours (gray, red, green, yellow, blue, pink, cyan and white) and eight backgrounds, plus bold and underline. You can't pick any colour you like: Discord only paints those codes.

Why don't the colours show on my phone?

Because the colour depends on how Discord renders code blocks, and the Python Discord guide warns that mobile doesn't colour them. On desktop they show; on mobile the block may appear without colour.

Why do I see “[31m” instead of the colour?

Because the escape character got lost when copying, or the block doesn't start with ```ansi. Copy the whole message with the button above and paste it without touching the first line.

Can a bot send it?

Yes: the bot writes the same text, with the escape character as \u001b. Above you have the line ready for discord.js and for discord.py.

Let your bot post it

If you want the rules, restart notices or help menu to come out in colour without copying anything, a bot sends them with the line above. If it needs permissions to post in a channel, work them out with the Discord bot permissions calculator.

At NapNodes you can host it for free: 256 MB, Node.js or Python, always on, and you only have to renew it every 7 days with one click in the panel. No card. If it falls short, the Mini plan (512 MB) is €1.50 a month: see the Discord bot plans.

Host your bot for free

More free tools

All the tools