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

Function alpha

packages/opencode/src/cli/cmd/run/theme.ts:94–96  ·  view source on GitHub ↗
(color: RGBA, value: number)

Source from the content-addressed store, hash-verified

92export const transparent = RGBA.fromValues(0, 0, 0, 0)
93
94function alpha(color: RGBA, value: number): RGBA {
95 return RGBA.fromValues(color.r, color.g, color.b, Math.max(0, Math.min(1, value)))
96}
97
98function rgba(hex: string, value?: number): RGBA {
99 const color = RGBA.fromHex(hex)

Callers 4

rgbaFunction · 0.85
generateSystemFunction · 0.85
mapFunction · 0.85
theme.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected