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.
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.
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.
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.
(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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With