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

Class RGBA

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

Source from the content-addressed store, hash-verified

60
61/** Represents a color in the RGBA color space. Extends the RGB class and adds an alpha component. */
62export 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…