withTransparency Method

Create a copy of this ColorDef with the specified transparency.

withTransparency(transparency: number): ColorDef

Parameter Type Description
transparency number the new transparency value. Must be between 0-255, where 0 means 'fully opaque' and 255 means 'fully transparent'.

Returns - ColorDef

a new ColorDef with the same color as this one and the specified transparency.

Defined in

Last Updated: 30 November, 2023