(base: RGBA, overlay: RGBA, alpha: number)
| 344 | } |
| 345 | |
| 346 | export function tint(base: RGBA, overlay: RGBA, alpha: number): RGBA { |
| 347 | const r = base.r + (overlay.r - base.r) * alpha |
| 348 | const g = base.g + (overlay.g - base.g) * alpha |
| 349 | const b = base.b + (overlay.b - base.b) * alpha |
| 350 | return RGBA.fromInts(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)) |
| 351 | } |
| 352 | |
| 353 | export function terminalMode(colors: TerminalColors): "dark" | "light" | undefined { |
| 354 | const bg = colors.defaultBackground |
no outgoing calls
no test coverage detected