Color Averaging (for Chromedi)
const avgEach = (...arrays) => Array(arrays[0].length).fill().map((_, i) => arrays.reduce((a, c) => a + c[i], 0) / arrays.length);
const setRgb = ([r,g,b]) => test.style.backgroundColor = `rgb(${r} ${g} ${g})`;
const setHsl = ([h,s,l]) => test.style.backgroundColor = `hsl(${h}deg ${s}% ${l}%)`;
Comments