diff --git a/dither-image.js b/dither-image.js index 618b884..1c00068 100644 --- a/dither-image.js +++ b/dither-image.js @@ -665,9 +665,11 @@ function decimate(input, palette, n) { //let rgb = bucket[bucket.length - 1]; // Take the luma-brightest color in the bucket + // wrong? bad //let rgb = bucket.slice().sort((a, b) => b.luma() - a.luma())[bucket.length - 1]; // Take the median color in the bucket + // bad //let rgb = bucket[bucket.length >> 1]; // Combine the brightest of each channel