withAlpha Method

Return a copy of this ColorDef with the specified alpha component.

withAlpha(alpha: number): ColorDef

@returns A ColorDef with equivalent red, green, and blue components to this one but with the specified alpha.

Parameter Type Description
alpha number the new alpha value as an integer between 0-255.

Returns - ColorDef

A ColorDef with equivalent red, green, and blue components to this one but with the specified alpha.

Defined in

Last Updated: 17 December, 2024