This commit is contained in:
Brooke Vibber 2023-03-24 17:56:56 -07:00
parent 71c19887c7
commit 50c0f59ce6
2 changed files with 9 additions and 0 deletions

View file

@ -651,6 +651,14 @@ function decimate(input, palette, n) {
rgb = rgb.multiply(brightest / avg_luma).clamp(); rgb = rgb.multiply(brightest / avg_luma).clamp();
} }
/*
// 1) take the brightest luma
// 2) take the most saturated chroma
// 3) profit!
let lumas = bucket.map((rgb) => rgb.luma());
let luma = Math.max(...lumas);
let rgb = bucket[lumas.indexOf(luma)];
*/
// pick the luma-brightest color in the bucket // pick the luma-brightest color in the bucket
// kinda nice but really aggressive with the colors // kinda nice but really aggressive with the colors

View file

@ -6,4 +6,5 @@ ffmpeg \
-ar 48000 \ -ar 48000 \
-vf 'pad=w=640:h=360:x=52:y=20' \ -vf 'pad=w=640:h=360:x=52:y=20' \
-pix_fmt yuv420p \ -pix_fmt yuv420p \
-movflags +faststart \
-y colamath-dither.mp4 -y colamath-dither.mp4