JavaScript
Article
By Sam Deering

4 Detect DarkLight Background jQuery Plugins

By Sam Deering
Last chance to win! You'll get a... FREE 6-Month Subscription to SitePoint Premium Plus you'll go in the draw to WIN a new Macbook SitePoint 2017 Survey Yes, let's Do this It only takes 5 min

In this post is a list of 4 Detect DarkLight Background jQuery Plugins. They are pretty useful for websites with dynamic backgrounds where light is used on dark backgrounds and dark used on light background.

1. BackgroundCheck

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.

BackgroundCheck.jpg
Source + Demo

2. colourBrightness.js

A lightweight and easy-to-use jQuery plugin that determines if the background colour of an element is light or dark.

colourBrightness-JS.jpg
SourceDemo

--ADVERTISEMENT--

3. jquery.adaptive-backgrounds.js

A simple jQuery plugin to extract the dominant color of an image and apply it to the background of its parent element.

Adaptive-Background-JS.jpg
SourceDemo

4. getImageBrightness

Brightness detection script.

getImageBrightness.jpg
Source + Demo

Further Reading:

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.Is it good?