withTransparency Method
Create a copy of this ColorDef with the specified transparency.
withTransparency(transparency: number): ColorDef
@returns a new ColorDef with the same color as this one and the specified transparency.
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
- core/common/src/ColorDef.ts Line 337
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.