1 2 3 4 5 6 7 8
x4 x72 x72 x72 x72 x72 x72 x72
export function calcIndex(pixel: Uint8Array, isRGB: boolean): number { return ( pixel[0] * 3 + pixel[1] * 5 + pixel[2] * 7 + (isRGB ? 255 * 11 : pixel[3] * 11) ) % 64; }