Check background image perceived brightness and add a class light or dark to the element
jQuery('.my-element').imageness();
Elements with class ".my-element" that have a background image set via CSS will get a 'dark-bg' or 'light-bg' depending on image perceived brightness.