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

Function luminance

packages/opencode/src/cli/cmd/run/theme.ts:107–109  ·  view source on GitHub ↗
(color: RGBA)

Source from the content-addressed store, hash-verified

105}
106
107function luminance(color: RGBA): number {
108 return 0.299 * color.r + 0.587 * color.g + 0.114 * color.b
109}
110
111function fade(color: RGBA, base: RGBA, fallback: number, scale: number, limit: number): RGBA {
112 if (color.a === 0) {

Callers 2

modeFunction · 0.70
mapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected