API Reference > imodeljs-common > Symbology > ColorDef > constructor constructor Method Create a new ColorDef. ColorDef(val?: string | ColorDefProps): ColorDef Parameter Type Description val string | ColorDefProps value to use.If a number, it is interpreted as a 0xTTBBGGRR (Red in the low byte, high byte is transparency 0==fully opaque) value.If a string, must be in one of the following forms:"rgb(255,0,0)""rgba(255,0,0,255)""rgb(100%,0%,0%)""hsl(120,50%,50%)""#rrbbgg""blanchedAlmond" (see possible values from ColorByName). Case insensitve. Returns - ColorDef Defined in core/common/src/ColorDef.ts Line 261 Last Updated: 13 June, 2024