Get information about image-color

Looping over all pixels is probably not very efficient, especially not if you are doing this on every request.
Resampling the image to 1x1 pixels and getting the luminance from it should work fine (if you cache the result). But keep in mind that this doesn’t check for a specific image region but for the whole image. Images with dark and bright parts won’t work.

1 Like