MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / buildLabPalette

Function buildLabPalette

web/js/algorithms.js:33–35  ·  view source on GitHub ↗
(palette)

Source from the content-addressed store, hash-verified

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

Callers 4

processWithClassicLabFunction · 0.85
processWithLabDitherFunction · 0.85
processWithTezumieFunction · 0.85

Calls 1

rgbToLabFunction · 0.85

Tested by

no test coverage detected