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

Function content

packages/ui/src/theme/resolve.ts:40–44  ·  view source on GitHub ↗
(seed: HexColor, scale: HexColor[])

Source from the content-addressed store, hash-verified

38 const backgroundHex = getHex(backgroundOverride)
39 const overlay = Boolean(backgroundOverride) && !backgroundHex
40 const content = (seed: HexColor, scale: HexColor[]) => {
41 const base = hexToOklch(seed)
42 const value = isDark ? (base.l > 0.84 ? shift(seed, { c: 1.18 }) : scale[10]) : scale[10]
43 return shift(value, { l: isDark ? 0.034 : -0.024, c: isDark ? 1.3 : 1.18 })
44 }
45 const modified = () => {
46 if (!colors.compact) return isDark ? "#ffba92" : "#FF8C00"
47 const warningHue = hexToOklch(colors.warning).h

Callers 2

modifiedFunction · 0.70
resolveThemeVariantFunction · 0.70

Calls 2

hexToOklchFunction · 0.90
shiftFunction · 0.90

Tested by

no test coverage detected