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

Function lift

packages/ui/src/theme/resolve.ts:98–98  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

96 const lum = (hex: HexColor) => {
97 const rgb = hexToRgb(hex)
98 const lift = (v: number) => (v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4))
99 return 0.2126 * lift(rgb.r) + 0.7152 * lift(rgb.g) + 0.0722 * lift(rgb.b)
100 }
101 const hit = (a: HexColor, b: HexColor) => {

Callers 1

lumFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected