| 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 { |
| 63 | a: number |
| 64 | /** |
| 65 | * Creates an instance of the RGBA class. |
| 66 | * |
| 67 | * @param r - The red component of the RGBA color. |
| 68 | * @param g - The green component of the RGBA color. |
| 69 | * @param b - The blue component of the RGBA color. |
| 70 | * @param a - The alpha component (opacity) of the RGBA color. |
| 71 | */ |
| 72 | constructor( |
| 73 | r: number, |
| 74 | g: number, |
| 75 | b: number, |
| 76 | a: number, |
| 77 | ) { |
| 78 | void super(r, g, b) |
| 79 | this.a = a |
| 80 | } |
| 81 | |
| 82 | /** Returns a string representation of the RGBA color in the format "rgb(r g b / a)". */ |
| 83 | toString = rgba_to_string.bind(null, this) |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Converts an RGB color to a string representation. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…