Image Dark/Light Detection Client Sided Script
问题 Does anyone know if there is a script available to detect darkness/lightness in an image (html included) using a client sided script? I basically want to be able to detect the type 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 of light (true of false). I know there are server sided script available but cannot use that for this particular development. Thanks in advance. 回答1: This function will convert each color