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

Function spread

packages/opencode/test/cli/run/theme.test.ts:56–59  ·  view source on GitHub ↗
(color: RGBA)

Source from the content-addressed store, hash-verified

54}
55
56function spread(color: RGBA) {
57 const [r, g, b] = color.toInts()
58 return Math.max(r, g, b) - Math.min(r, g, b)
59}
60
61test("falls back when palette lookup fails", async () => {
62 expect(await resolveRunTheme(renderer({ fail: true }))).toBe(RUN_THEME_FALLBACK)

Callers 1

theme.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected