(base: RGBA, overlay: RGBA, value: number)
| 165 | } |
| 166 | |
| 167 | function tint(base: RGBA, overlay: RGBA, value: number): RGBA { |
| 168 | return RGBA.fromInts( |
| 169 | Math.round((base.r + (overlay.r - base.r) * value) * 255), |
| 170 | Math.round((base.g + (overlay.g - base.g) * value) * 255), |
| 171 | Math.round((base.b + (overlay.b - base.b) * value) * 255), |
| 172 | ) |
| 173 | } |
| 174 | |
| 175 | function blend(color: RGBA, bg: RGBA): RGBA { |
| 176 | if (color.a >= 1) { |
no outgoing calls
no test coverage detected