Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Color text in discord

My goal is to partly color a text. I know I can use .sendCode("css","this is my message"); which we'll make my text yellow but I don't want my whole text to be yellow.

Perhaps I could create another .css file and then call it from my JavaScript file but as I am inexperienced with JavaScript I would like some help with it. I think that's the fastest way to do it.

like image 266
nonerth Avatar asked Jan 18 '17 22:01

nonerth


People also ask

Can you change the color of text in Discord?

Changing text color in Discord Once there, you need to press the backtick symbol three times, like so: ““`”. You need to do that, without the quotation marks, and then press “Shift+Enter” to move to the second line of the message. From here, type one of several coding commands to change the text's color.

How do you format text color in Discord?

Formatting colored text in Discord You will have to create multiple line code blocks and then specify the syntax highlighting language. Make a multiple line code block by adding three backticks, and add the reference to the highlighting programming language right at the beginning of the code block.

How do you color text in Discord mobile?

Now, the next big question is how to change the text color in Discord on Android/iOS. The answer to this is, that you can't! Yes, there is no way you can change the text color using the mobile app itself.


1 Answers

(Updated for 2022)

In 2022's polish week, Discord added support for ansi on code blocks, previously it was not possible to display colors on the chat, however you could "mimic" colored output by selecting specific highlighted languages like prolog or css.

To display colored text using code-blocks, you simply need to create a code block with the language set to ansi and then use any of the several ansi escape codes to style your text.

Here is a simple example of a message which will display in red. The escape code used for ansi is \033.

```ansi
[0;31m RED TEXT
```

Do note however, that Discord does not render all colors as you would expect them, having some special issues with background colors being mostly shades of grey.

ansi color preview on discord

like image 54
Fabricio20 Avatar answered Sep 19 '22 13:09

Fabricio20