MCPcopy Create free account
hub / github.com/anomalyco/opencode / tint

Function tint

packages/tui/src/theme/index.ts:346–351  ·  view source on GitHub ↗
(base: RGBA, overlay: RGBA, alpha: number)

Source from the content-addressed store, hash-verified

344}
345
346export 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
353export function terminalMode(colors: TerminalColors): "dark" | "light" | undefined {
354 const bg = colors.defaultBackground

Callers 7

BgPulseFunction · 0.90
renderLineFunction · 0.90
PromptFunction · 0.90
QuestionPromptFunction · 0.90
fadedColorFunction · 0.90
generateSystemFunction · 0.70
SessionHeaderFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected