MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / RGB

Class RGB

packages/frontend/src/ui/color.ts:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42/** Represents a color in the RGB color space. */
43export 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. */
62export class RGBA extends RGB {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected