| 41 | |
| 42 | /** Represents a color in the RGB color space. */ |
| 43 | export class RGB { |
| 44 | /** |
| 45 | * Creates an instance of the RGB class. |
| 46 | * |
| 47 | * @param r - The red component of the RGB color. |
| 48 | * @param g - The green component of the RGB color. |
| 49 | * @param b - The blue component of the RGB color. |
| 50 | */ |
| 51 | constructor( |
| 52 | public r: number, |
| 53 | public g: number, |
| 54 | public b: number, |
| 55 | ) {} |
| 56 | |
| 57 | /** Returns a string representation of the RGB color in the format "rgb(r g b)". */ |
| 58 | toString = rgb_to_string.bind(null, this) |
| 59 | } |
| 60 | |
| 61 | /** Represents a color in the RGBA color space. Extends the RGB class and adds an alpha component. */ |
| 62 | export class RGBA extends RGB { |
nothing calls this directly
no outgoing calls
no test coverage detected