(palette)
| 31 | } |
| 32 | |
| 33 | function buildLabPalette(palette) { |
| 34 | return palette.map(c => ({ rgb: c, lab: rgbToLab(c[0], c[1], c[2]) })); |
| 35 | } |
| 36 | |
| 37 | function nearestLabColor(r, g, b, labPalette) { |
| 38 | const srcLab = rgbToLab(r, g, b); |
no test coverage detected