Is there any way to tell if an image is light or dark in ruby?
The use case is as a user uploads an image, the application (e.g. the controller in a rails app) could automatically detect whether an image is light or dark and record that result so the view can place the image on an appropriate background for maximal contrast.
I found similar answers here for python and here for javascript, but couldn't spot the equivalent in ruby