Quantcast
Channel: slideshow – Codrops
Viewing all articles
Browse latest Browse all 53

Color Extraction Effect

$
0
0

ColorExtraction

View demo Download source

Today we’d like to share a fun little color extraction experiment with you. The idea is to create a color palette from an image with a subtle effect on the image itself and some fanciness on the palette. We are using Vibrant.js by Jari Zwarts to extract the colors from the images, and CSS Filters to transition the image to a black and white version. We also implemented a simple slider with a special “curtain” effect.

Attention: This experiment uses some CSS properties that might not work in older browsers (CSS Animations, CSS Filters).

ColorExtraction_01

For IE 10+, where we don’t have support for CSS Filters (only in Edge behind a flag), we added a simple fallback where we place a SVG image on top of the colored one and apply a SVG filter effect.

ColorExtraction_02

For the color palette items, we add a little wave as background image and animate it, to simulate the item getting “filled” with the color that we extract using Vibrant.js. The Hex color code is placed beneath the extracted color.

ColorExtraction_03

We hope you enjoy this little experiment and find it inspiring!

View demo Download source

Color Extraction Effect was written by Mary Lou and published on Codrops.


Viewing all articles
Browse latest Browse all 53

Trending Articles