diff options
author | 2022-03-23 22:35:32 +0100 | |
---|---|---|
committer | 2022-03-23 22:35:32 +0100 | |
commit | 806ce3fdf433d05b9d480a3d7ca2332dac951194 (patch) | |
tree | 8cedc73afe9bb7ca65e6110df523857a808c532e /pydis_site | |
parent | Update discord-messages-with-colors.md (diff) |
Update discord-messages-with-colors.md
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/content/resources/guides/python-guides/discord-messages-with-colors.md | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/pydis_site/apps/content/resources/guides/python-guides/discord-messages-with-colors.md b/pydis_site/apps/content/resources/guides/python-guides/discord-messages-with-colors.md index 30f40948..c8e50d71 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/discord-messages-with-colors.md +++ b/pydis_site/apps/content/resources/guides/python-guides/discord-messages-with-colors.md @@ -3,13 +3,13 @@ title: Discord Messages with Colors description: A guide on how to add colors to your codeblocks on Discord --- -Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you. +Discord is now slowly rolling out the ability to send colored text within code blocks. This is done using ANSI color codes which is also how you print colored text in your terminal. -To be able to send a colored text, you need to use the `ansi` language for your code block and provide a prefix of this format before writing your text: -``` +To send colored text in a code block you need to first specify the `ansi` language and use the prefixes similar to the one below: +```ansi \u001b[{format};{color}m ``` -*The `\u001b` is the unicode for ESCAPE/ESC, see <http://www.unicode-symbol.com/u/001B.html>.* ***If you want to use it yourself without bots, then you need to copy paste the character from the website.*** +*`\u001b` is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see <http://www.unicode-symbol.com/u/001B.html>).* ***If you wish to send colored text without using your bot you need to copy the character from the website.*** After you've written this, you can type and text you wish, and if you want to reset the color back to normal, then you need to use `\u001b[0m` as prefix. @@ -34,13 +34,13 @@ Here is the list of values you can use to replace `{color}`: *The following values will change the **text background** color.* -* 40: Some very dark blue +* 40: Firefly dark blue * 41: Orange -* 42: Gray -* 43: Light gray -* 44: Even lighter gray +* 42: Marble blue +* 43: Greyish turquoise +* 44: Gray * 45: Indigo -* 46: Again some gray +* 46: Light gray * 47: White Let's take an example, I want a bold green colored text with the very dark blue background. @@ -54,7 +54,8 @@ or<br> \u001b[1;40;32mThat's some cool formatted text right?<br> \`\`\` -Result:<br> +Result: +  The way the colors look like on Discord is shown in the image below: |