* @returns {string} e.g. "rgba(255, 0, 0, 1)"
()
| 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" |
no outgoing calls
no test coverage detected