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
- core/common/src/ColorDef.ts Line 286
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.