MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / constructor

Method constructor

src/utils/color/hex.js:16–21  ·  view source on GitHub ↗

* Hex color constructor * @param {number} r Red value in hexadecimals * @param {number} g Green value in hexadecimals * @param {number} b Blue value in hexadecimals * @param {number} a Alpha value between 0 and 1

(r, g, b, a = 1)

Source from the content-addressed store, hash-verified

14 * @param {number} a Alpha value between 0 and 1
15 */
16 constructor(r, g, b, a = 1) {
17 this.r = r;
18 this.g = g;
19 this.b = b;
20 this.a = a;
21 }
22
23 /**
24 * Creates a Hex color from an RGB color

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected