What is color format when using "embed.color"?
Basically title, it seems it isn't hex or rgb, what is it then?
4 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
for the record, it returns me the following number:
5797096
oh hi again lol
weird enough, I don't see the property hexColor in my json, do you have any function to convert the color?
from eval
This is my sample:
just using JSON.stringify() on an embed I createI have to convert it outside of the bot
that's why I asked you if you have a function to convert it
long story, but I have everything else working
basically send the json through a post request to an external api
json
I need to convert the color value to hex
that's it :v
as a string actually
const decimalColor = 3066993;
const hexColor = decimalColor.toString(16).padStart(6, '0');
console.log(hexColor); // returns "2ECC71"
thanks anyways for your help