MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / constructor

Method constructor

javascript/selenium-webdriver/lib/color.js:31–36  ·  view source on GitHub ↗

* @param {number} red * @param {number} green * @param {number} blue * @param {number} alpha

(red, green, blue, alpha = 1)

Source from the content-addressed store, hash-verified

29 * @param {number} alpha
30 */
31 constructor(red, green, blue, alpha = 1) {
32 this.red_ = Color.#clamp255(red)
33 this.green_ = Color.#clamp255(green)
34 this.blue_ = Color.#clamp255(blue)
35 this.alpha_ = Color.#clamp01(alpha)
36 }
37
38 /**
39 * Guesses the input color format and returns a Color instance.

Callers

nothing calls this directly

Calls 2

#clamp255Method · 0.80
#clamp01Method · 0.80

Tested by

no test coverage detected