note = {
if (method=='Brightness') {
let brightness = pixel_color.r+pixel_color.g+pixel_color.b;
return c_scale[Math.floor((c_scale.length-1)*brightness/(255*3))];
} else if (method == 'Hue') {
let hue = pixel_hsl.h;
return c_scale[Math.floor((c_scale.length-1)*hue/(360))];
} else if (method == 'Saturation') {
let sat = pixel_hsl.s;
return c_scale[Math.floor((c_scale.length-1)*sat)];
}
}