title: Image brightness detection in client side script
body: <p>Does anyone know if there is a script available to detect darkness/lightness in an image (HTML included) using a client sided script?</p>
  <p>I basically want to be able to detect the brightness of image (dark/light) used in the background and have CSS/HTML/jQuery/JS adapt the page based on a variable that is either dark or light (true or false).</p>
  <p>I know there are server-side scripts available but cannot use that for this particular development project.</p>