DEV Community

Discussion on: Send automated Discord messages through Webhooks using JavaScript (Part 2 - Embeds)

Collapse
 
oskarcodes profile image
Oskar Codes • Edited

@plug18343602 yeah you can use a decimal color value like @pealco821103 said, but you can also include the hexToDecimal function if you want to use a HEX color code:

function hexToDecimal(hex) {
  return parseInt(hex.replace("#",""), 16)
}