Discord markdown, ANSI colour and unicode nicknames

Discord gives you three separate ways to change how text looks, and they do not mix. There is its own markdown, which handles bold and italic. There is the ANSI code block, which is the only way to get colour. And there is unicode styling, which works in the places the other two cannot reach. Picking the wrong one is why a message arrives full of visible asterisks or a nickname arrives full of boxes.

Markdown works on plain characters only

Discord reads a small markdown dialect in message bodies. Asterisks around a word make it bold, underscores make it italic, tildes strike it through, backticks make it monospace.

That parsing runs on the characters you send. Wrap a styled word in asterisks and Discord still applies bold to it, but the styled letters are already fixed shapes from the Mathematical Alphanumeric Symbols block, so there is nothing for the bold to change. You get the same glyphs with two asterisks rendered around them or, depending on the client, the asterisks stripped and no visible difference.

So markdown and unicode styling are alternatives rather than layers. Use markdown when the text is a message and you want emphasis Discord understands. Use unicode when you need the styling to survive somewhere markdown does not run, which is most of the interface.

Where markdown does not run

Markdown is a message-body feature. It does not apply to a server nickname, a username, a channel name, a role name, a status, or most embed fields inserted by bots.

Those are the places people most want styled text, and they are exactly the places where unicode is the only option that works. A nickname written with the fancy text generator renders as the styled characters because the client is drawing text rather than parsing markup.

The trade is the usual one. Markdown is safe, reversible and readable by assistive technology, and it only works in messages. Unicode works everywhere text is drawn, and it carries the costs covered further down: search, screen readers, and missing glyphs on devices with thin font coverage.

Colour needs an ANSI code block

Discord has no colour syntax in ordinary messages. The one place it renders coloured text is inside a code block tagged ansi, where it interprets a small set of terminal escape sequences.

The palette is fixed and small: eight foreground colours, which correspond to the standard terminal codes 30 through 37. There is no hex colour, no gradient, no arbitrary value. Whatever colour you want, the result is the nearest of those eight.

This site maps a chosen gradient onto that palette when you pick the Discord format in the copy menu, choosing the nearest available colour for each part of the ramp rather than defaulting to one. A gold ramp stays in the yellow region, a rainbow ramp moves through six of the eight, and an ice ramp collapses to two because Discord has nothing in between its blue and its cyan.

You can see the effect on the coloured name generator.

What an ANSI block costs you

Every colour change inside the block is an escape sequence made of real characters, and a Discord message caps at 2,000 characters.

A naive implementation writes one escape before every letter, which is about five characters of overhead per character of text. A 200-character message would blow the limit with room to spare. This site writes one escape per colour change rather than per character, so a run of the same colour costs the overhead once. A gradient across a short name costs a handful of sequences rather than dozens.

The block also renders as a code block, which means monospace text in a bordered box. That is fine for a signature or an announcement and wrong for conversational text. Nobody wants a chat line in a grey rectangle.

And it is desktop and web first. Mobile clients have historically been less consistent about rendering ANSI colour, so a message that looks right on your desktop may be plain on someone's phone.

Nicknames are the most forgiving field

A Discord server nickname accepts a wide range of unicode, which makes it the field where decorative styling actually pays off.

Frames travel especially well there. A frame leaves your letters as ordinary ASCII and wraps ornaments around them, so if a reader's device cannot draw the ornament you lose the ornament rather than the name. A substituted alphabet fails the other way: if the glyphs are missing, the name is boxes.

That makes a frame the safer default for anything people need to read in a member list. The gamertag generator leans on frames for the same reason, and the stylish name generator has the broader set if you want to browse.

Keep it short. A member list renders names at a small size in a narrow column, and a long framed name truncates before the frame closes, which looks worse than no frame at all.

Search is where styled text costs you

Discord search matches characters. A styled word shares no code points with its plain spelling, so searching for a name will not find the styled version of it.

That matters more on Discord than on most platforms, because the interface leans on search and mention autocomplete constantly. A member whose nickname is entirely styled is hard to mention, hard to find in a member list you are filtering, and hard for a moderator to look up.

The usual compromise is a plain core with decoration around it. Your actual name stays in ASCII letters so autocomplete matches it, and the ornaments sit outside. Anyone typing the first few letters of your name still finds you.

If you have inherited a fully styled string and need the plain version, the plain text converter folds it back to ASCII.

Bots, embeds and the fields you do not control

Plenty of what appears in a Discord channel is inserted by a bot rather than typed by a person, and those fields have their own rules.

An embed title, a field name, a footer: each has its own length limit set by the API, and those limits count characters as the platform counts them rather than as you do. Styled text stored above U+FFFF costs two storage units per character in most implementations, so a title that fits plain may not fit styled.

Some bots sanitise input before echoing it, stripping characters outside a permitted range. Some normalise, which folds styled alphabets back to plain automatically. Neither behaviour is announced.

If you are putting styled text through a bot, test the specific bot rather than assuming it behaves like the client.

A practical arrangement

For messages, use Discord's own markdown. It is readable, it is reversible, assistive technology handles it correctly, and it costs you nothing.

For a nickname, use a frame with a plain core, keep it short enough to survive the member list, and check it renders on a phone as well as on desktop.

For colour, use an ANSI block only when the message is meant to be looked at rather than read: an announcement header, a signature, a rules line. Do not put conversation in a code block.

For anything a moderator, a bot or another member may need to search, keep enough plain characters that autocomplete can find it.

That covers almost every case, and it leaves unicode styling for the situations where it is the only option rather than making it the default.

Why some members see boxes

If a device has no font containing a code point, it draws the font's .notdef glyph instead: a hollow rectangle, sometimes with hex digits inside.

Discord runs on desktop, web, iOS, Android, consoles and embedded browsers, which is a wider range of font coverage than most platforms have to deal with. Older Android builds and locked-down work machines are the usual failures, and those are the members least likely to mention it.

The styles most likely to be covered everywhere are the ones that have been in the standard longest: bold, italic, bold italic, monospace. The least likely are the newer decorative ranges and anything drawing on regional or historical blocks.

A reasonable test is an older Android phone and a plain terminal. If your nickname survives both it will survive nearly anywhere, and if it does not, you have found out before half a server saw a row of rectangles where your name should be.

Frequently asked questions

Can I use bold markdown on unicode styled text?

Discord will apply the markdown, but the styled letters are already fixed glyphs so nothing visibly changes. Treat markdown and unicode styling as alternatives rather than layers.

How do I get coloured text in Discord?

Only inside a code block tagged ansi, and only in the eight foreground colours Discord supports. There is no hex colour and no gradient.

Does styled text work in a Discord username?

Server nicknames are permissive. The account username is more restricted, and the rules there have changed over time, so test before committing to one.