MCPcopy Create free account
hub / github.com/Railly/tinte / hueDiff

Function hueDiff

apps/web/src/lib/theme/ice-theme.ts:191–194  ·  view source on GitHub ↗
(a: number, b: number)

Source from the content-addressed store, hash-verified

189
190// Dedup por hue (grados OKLCH) para no meter colores casi iguales
191const hueDiff = (a: number, b: number) => {
192 const d = Math.abs(a - b);
193 return d > 180 ? 360 - d : d;
194};
195function dedupByHue(colors: string[], tol = 8) {
196 const out: string[] = [];
197 const seen: number[] = [];

Callers 1

dedupByHueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected