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

Method asRgba

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

* @returns {string} e.g. "rgba(255, 0, 0, 1)"

()

Source from the content-addressed store, hash-verified

78 * @returns {string} e.g. "rgba(255, 0, 0, 1)"
79 */
80 asRgba() {
81 let a
82 if (this.alpha_ === 1) {
83 a = '1'
84 } else if (this.alpha_ === 0) {
85 a = '0'
86 } else {
87 a = String(this.alpha_)
88 }
89 return `rgba(${this.red_}, ${this.green_}, ${this.blue_}, ${a})`
90 }
91
92 /**
93 * @returns {string} e.g. "#ff0000"

Callers 3

toStringMethod · 0.95
equalsMethod · 0.95
color_test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected