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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
GeekCorner
GeekCornerOP2y ago
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:
{"type":"rich","title":"Aide","color":11278748,"fields":[{"name":":tools: Modération","value":"`\``G*mod``\`","inline":true},{"name":":tada: Fun","value":"\`\`\`G*fun \`\`\`","inline":true},{"name":":question: Informations","value":"\`\`\`G*infos\`\`\`","inline":true},{"name":":notes: Musique","value":"``\`G*musique``\`","inline":true}],"footer":{"text":"Demandé par GeekCornerD#8010","icon_url":"https://cdn.discordapp.com/avatars/710836174050164757/e4111fa0f8493ea24ea651826013d365.webp","proxy_icon_url":"https://images-ext-2.discordapp.net/external/67fLsIQMKkVbR1E8HHui_MSSKtThDmPf8wHqAoplzVM/https/cdn.discordapp.com/avatars/710836174050164757/e4111fa0f8493ea24ea651826013d365.webp"}}
{"type":"rich","title":"Aide","color":11278748,"fields":[{"name":":tools: Modération","value":"`\``G*mod``\`","inline":true},{"name":":tada: Fun","value":"\`\`\`G*fun \`\`\`","inline":true},{"name":":question: Informations","value":"\`\`\`G*infos\`\`\`","inline":true},{"name":":notes: Musique","value":"``\`G*musique``\`","inline":true}],"footer":{"text":"Demandé par GeekCornerD#8010","icon_url":"https://cdn.discordapp.com/avatars/710836174050164757/e4111fa0f8493ea24ea651826013d365.webp","proxy_icon_url":"https://images-ext-2.discordapp.net/external/67fLsIQMKkVbR1E8HHui_MSSKtThDmPf8wHqAoplzVM/https/cdn.discordapp.com/avatars/710836174050164757/e4111fa0f8493ea24ea651826013d365.webp"}}
just using JSON.stringify() on an embed I create
d.js docs
d.js docs2y ago
property Embed#hexColor The hex color of this embed.
GeekCorner
GeekCornerOP2y ago
I 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
Want results from more Discord servers?
Add your server