Reputation: 115
I have searched the web but found no answer.
I created an embed for my discord bot and i know how to set the color of the bar on the left but how can i change the color of the text the bot sends?
Upvotes: 1
Views: 22143
Reputation: 1083
The only solution I've been able to find for this (have had the same question before) was using syntax highlighting
```css
green text
```
You can find a list at this github gist
Hope it helps, I don't know about any other solution to really "color" texts without using syntax highlighting.
UPDATE: Regarding comment from OP.
This was a way I've been able to include it into an embed.
async def test(ctx, *args):
retStr = str("""```css\nThis is some colored Text```""")
embed = discord.Embed(title="Random test")
embed.add_field(name="Name field can't be colored as it seems",value=retStr)
await ctx.send(embed=embed)
produced this:
Without embed:
async def test(ctx, *args):
retStr = str("""```css\nThis is some colored Text```""")
await ctx.send(retStr)
It is important to write a new line \n
after the language you choose for syntax highlighting otherwise it doesn't recognize it language declaration
Upvotes: 8