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

Function alphaTone

packages/ui/src/theme/resolve.ts:67–68  ·  view source on GitHub ↗
(color: HexColor, alpha: number)

Source from the content-addressed store, hash-verified

65 }
66 const background = backgroundHex ?? neutral[0]
67 const alphaTone = (color: HexColor, alpha: number) =>
68 overlay ? (withAlpha(color, alpha) as ColorValue) : blend(color, background, alpha)
69 const borderTone = (light: number, dark: number) =>
70 alphaTone(ink, isDark ? Math.min(1, dark + 0.024 + (colors.compact ? 0.08 : 0)) : Math.min(1, light + 0.024))
71 const diffHiddenSurface = surface(

Callers 2

surfaceFunction · 0.85
borderToneFunction · 0.85

Calls 2

withAlphaFunction · 0.90
blendFunction · 0.90

Tested by

no test coverage detected