I'm working on a program to use randomly-selected images as a desktop background. Now, not all images are the same shape as a computer monitor. One idea I had for dealing with this is to set a background color that is perceptually similar to the image. How would I go about finding this color?
Simple RGB averaging doesn't take into account nonlinearities such as monitor gamma, and doesn't deal with the human vision system.