@tempots/color
RGB class
Represents a color in the RGB color model.
Signature:
declare class RGB
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Creates a new |
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
number |
Gets the blue channel value of the color. | |
|
(other: RGB) => boolean |
Checks if the color is equal to another | |
|
(r: number, g: number, b: number) => RGB |
Creates an | |
|
(s: string) => RGB |
Creates an | |
|
number |
Gets the green channel value of the color. | |
|
([r, g, b]: [r: number, g: number, b: number]) => RGB |
Creates an | |
|
number |
Gets the red channel value of the color. | |
|
() => [number, number, number] |
Converts the color to an array of normalized RGB channel values. | |
|
() => string |
Converts the color to a string representation in the format "#RRGGBB". | |
|
number |