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

Method asHex

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

* @returns {string} e.g. "#ff0000"

()

Source from the content-addressed store, hash-verified

93 * @returns {string} e.g. "#ff0000"
94 */
95 asHex() {
96 const toHex = (n) => n.toString(16).padStart(2, '0')
97 return `#${toHex(this.red_)}${toHex(this.green_)}${toHex(this.blue_)}`
98 }
99
100 /** @override */
101 toString() {

Callers 1

color_test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected