API Reference > imodeljs-common > Symbology > RgbColor > toColorDef toColorDef Method Converts this RgbColor to a ColorDef. toColorDef(transparency: number = 0): ColorDef Parameter Type Description transparency number Value to use for the transparency component of the ColorDef. Returns - ColorDef A ColorDef with RGB components equivalent to those of this RgbColor and transparency component as specified. Defined in core/common/src/RgbColor.ts Line 46 Last Updated: 11 June, 2024