1
votes

So i'm trying to make the bot visualize different hex colors, but there is some problems with the hex color #FFFFFF, on google you can see its white, but if I do embed = discord.Embed(color=0xFFFFFF) it's a black color is there some other way to do this for it to work the way I want?

Tried this, but still black

r = 255 #temp testing
g = 255 #temp testing
b = 255 #temp testing
embed = discord.Embed(color=discord.Color.from_rgb(r, g, b))
2
Try color=discord.Color.white()Kelo
I tried that already its still black no matter how the letters are capitalizedpevegaf678
I just tried converting with all values as 255 (white) but its still black, maybe discord doesn't allow white? unless I did it wrongpevegaf678
@Jab It diesn't matter if the Fs are lowercase, it's python hex literalsRoy Cohen

2 Answers

3
votes

This is probably bad code, but since it seems like color #ffffff is not allowed I did this to make it work.

if hexxx == 'FFFFFF':
   hexxx = 'FFFFFE'

This seems to work, but if anyone has a better answer please tell.

White square

0
votes

I raised an issue in the Discord.py Github repo and was told that its not an API issue but Discord reserves pure black and pure white embeds for their own use to allow it to be theme friendly.

The recommended solution is to use a different hexcode that is closest to white similar to what @pevegaf678 said.