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

Function quantizeColor

packages/opencode/src/cli/cmd/run/theme.ts:468–474  ·  view source on GitHub ↗
(indexed: RGBA[], rgba: RGBA)

Source from the content-addressed store, hash-verified

466}
467
468function quantizeColor(indexed: RGBA[], rgba: RGBA): RGBA {
469 if (rgba.a === 0 || rgba.intent === "default" || rgba.intent === "indexed") {
470 return RGBA.clone(rgba)
471 }
472
473 return nearestIndexed(indexed, rgba)
474}
475
476function quantizeTheme(theme: TuiThemeCurrent, indexed: RGBA[]): TuiThemeCurrent {
477 const resolved = Object.fromEntries(

Callers 1

quantizeThemeFunction · 0.85

Calls 2

nearestIndexedFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected