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(rhs: RgbColor): boolean    
toColorDef(transparency: number = 0): ColorDef Converts this RgbColor to a ColorDef.  
toJSON(): RgbColorProps    
fromColorDef(colorDef: ColorDef): RgbColor Static Constructs from the red, green, and blue components of a ColorDef.  
fromJSON(json: undefined | RgbColorProps): RgbColor Static    

Properties

Name Type Description
b Readonly number    
g Readonly number    
r Readonly number    

Defined in

Last Updated: 29 November, 2022