-1

I am working on my portfolio and came across this website http://abduzeedo.com/ which has a sweet hover effect, where the dropshadow would take the average color of the image.

I have been trying lots of different solutions but couldn't seem to come up with anything that works smoothly.

Is there a simple js library to achieve this effect?

Thanks!

Ruxie
  • 69
  • 8
  • 1
    If you are talking about when you hover the main banner, then the dropshadow is hardcoded in their stylesheet, they don't use any kind of plugin – Pete Feb 14 '18 at 16:01
  • I thought so too, but if you look at the other small post images they also have the hover effect. When I had a look at the code, I could not find out how the hover state was added :/ Any help would be appreciated! – Ruxie Feb 14 '18 at 16:05
  • You could write something along the lines of https://stackoverflow.com/questions/2541481/get-average-color-of-image-via-javascript – Pete Feb 14 '18 at 16:09

1 Answers1

-1

You can look at the library that website is using https://github.com/jariz/vibrant.js/

teevik
  • 112
  • 1
  • 7
  • As for exactly their code and how they use the library, it's in http://abduzeedo.com/themes/abdz/js/main.js?v=1.x starting at line 230 – teevik Feb 14 '18 at 16:12
  • Thank you! This is really helpful, will give it a shot :) – Ruxie Feb 14 '18 at 16:14