Does anyone know how to change the color of text to white when the image is "dark" and black when the image is "light"?
I need this because my background is pulled from flickr and I can't guarantee what it'll be!
Does anyone know how to change the color of text to white when the image is "dark" and black when the image is "light"?
I need this because my background is pulled from flickr and I can't guarantee what it'll be!
You can do this using the "canvas" tag with a simple function located here -> http://jsfiddle.net/s7Wx2/
source: Image Dark/Light Detection Client Sided Script
getImageLightness("image.jpg",function(brightness){
console.log(brightness);
});