API Reference > imodeljs-common > Symbology > ColorDef > withAlpha withAlpha Method Return a copy of this ColorDef with the specified alpha component. withAlpha(alpha: number): ColorDef 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 278 Last Updated: 12 June, 2024