API Reference > imodeljs-common > Symbology > RgbColor RgbColor Class An immutable representation of a color with red, green, and blue components each in the integer range [0, 255]. Methods Name Description constructor(r: number, g: number, b: number): RgbColor Constructs from red, green, and blue components. equals(other: RgbColor): boolean toJSON(): RgbColorProps fromColorDef(colorDef: ColorDef): RgbColor Static Constructs from the red, green, and blue components of a ColorDef. fromJSON(json: RgbColorProps | undefined): RgbColor Static Properties Name Type Description b ConstructorProperty number Blue g ConstructorProperty number Green r ConstructorProperty number Red Defined in core/common/src/ColorDef.ts Line 672 Last Updated: 13 June, 2024