briangonzalez / jquery.adaptive-backgrounds.js

🦎 A jQuery plugin for extracting the dominant color from images and applying the color to their parent.
http://briangonzalez.github.io/jquery.adaptive-backgrounds.js/
6.53k stars 454 forks source link

Possible to set opacity for the background color? #22

Closed macsupport closed 10 years ago

macsupport commented 10 years ago

Since it seems the background-color of the parent is set to rgb, is it possible to use rgba so an opacity could be set?

briangonzalez commented 10 years ago

For something like this, I'd hook into the ab-color-found event (docs), munge the color with something like TinyColor, and then re-apply it.

Hope this helps!