MCPcopy Index your code
hub / github.com/anomalyco/opencode / rgba

Function rgba

packages/opencode/src/cli/cmd/run/theme.ts:98–101  ·  view source on GitHub ↗
(hex: string, value?: number)

Source from the content-addressed store, hash-verified

96}
97
98function rgba(hex: string, value?: number): RGBA {
99 const color = RGBA.fromHex(hex)
100 return value === undefined ? color : alpha(color, value)
101}
102
103function mode(bg: RGBA): "dark" | "light" {
104 return luminance(bg) > 0.5 ? "light" : "dark"

Callers 2

mapFunction · 0.85
theme.tsFile · 0.85

Calls 1

alphaFunction · 0.85

Tested by

no test coverage detected