This commit is contained in:
Brooke Vibber 2023-03-24 13:19:31 -07:00
parent 0c8ca1380d
commit 71c19887c7

View file

@ -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