ConvertColorToARGB
Syntax
ConvertColorToARGB(color: number | string, alpha = 255): numberParameters
Return Value
Description
Example
Last updated
ConvertColorToARGB(color: number | string, alpha = 255): numberLast updated
// Using hex string input
const redWithAlpha = this.api.ConvertColorToARGB('#FF0000', 128) // Half-transparent red
const blueOpaque = this.api.ConvertColorToARGB('#0000FF') // Fully opaque blue
const greenWithAlpha = this.api.ConvertColorToARGB('#7F00FF00') // Green with embedded alpha
// Using numeric input
const red = this.api.ConvertColorToARGB(0xff0000) // Fully opaque red
const blue = this.api.ConvertColorToARGB(0x0000ff) // Fully opaque blue