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