Interactive Drag and Drop Coloring Concept

A little fun experiment where you can color a website mockup by dragging and dropping a color droplet from a palette.

From our sponsor: Try Mailchimp today.

Today we would like to share a fun interactive coloring concept with you. The idea is to simply drag a color from a color palette to a website mockup and color designated areas of it (like sections or texts). You might have encountered customization tools before, but we wanted to add some fun to this idea and make it enjoyable to use.

And this is how it can be used: you can drag a color from the color palette and drop it on any area that lights up with a blue outline, including text elements. Once the droplet that you are dragging gets dropped on a content area, a fun little Google Material like animation happens and the whole area gets filled with a colored circle. For that effect we use an SVG element that we create on the fly and then scale it up and fade it in with a CSS transition.

You can reset the whole thing by clicking on the droplet icon in the palette toolbar.

For the drag and drop functionality we are using the brilliant interact.js library.

Please note that this is highly experimental and only ready for modern browsers. IE does not support transitions on SVG elements so you won’t see the colored circle expanding.

Here is how you drag the droplet to the content or text elements of the website mockup:


The end result is the coloring of the area with a fun animation:


Have a look at this animated GIF:


And now, go and have some fun coloring 😉

We really hope you enjoy this little effect and find it inspiring.

Tagged with:

Mary Lou

ML is a freelance web designer and developer with a passion for interaction design. She studied Cognitive Science and Computational Logic and has a weakness for the smell of freshly ground peppercorns.

Stay up to date with the latest web design and development news and relevant updates from Codrops.

Feedback 64

Comments are closed.
  1. OH.MY.GOD!
    That was awesome.I don’t know how long it’ll take to be such a good designer and developer but i wanna be like you…SOON!

  2. Amazing. We love to use color pickers in WP Themes, but this is so much simpler in terms of usability. Thank you for the inspiration!

  3. Amazing effect, well done! Might end up using something based on this in next project, really nice (:

  4. Mary Lou, how to be awesome like you? How you come to this stage? You’re THE BEST.

  5. It’s awesome, Someday I hope to be like you, you love what you do and show it with your creations and best of all, they share what they know without wanting anything in return, do not know how much I admire: D

  6. Is there any callback function after droping a color on paint area that returns color code and dropped area id . So in server I can save this meta data.

    • Looking at the interact.js docs it seems to support a few different events when dropping. dropactivate, dropdeactivate, dragenter, dragleave, dropmove, drop.

      Using these events you could send a save request to your server.

      interact(dropTarget) .dropzone({ ondrop: function (event) { // send request to server here } })

      Hopefully that helps.

  7. *Jaw Drop
    Woow , just woow !!
    I will dig it deeper and hope it will applicable for my demo themes.

    Thanks !!

  8. WOAW…freakking awesome. This just takes codrops to the next lvl. Great work Mary. Keep it up !

  9. This is a really slick idea that I see the postential to go beyond colors and the web. I could see that interaction being used on something like those Coca-Cola Freestyle machines to potentially make the experience quicker & easier. It seems to take people forever to use them, and large lines tend to form which cause traffic issues in the restaurants that have them.

  10. That is really fun. Thank you for this. This is a pretty amazing way to create a website that would allow the user to customize their experience in a fun and interactive way! (Maybe as a way to customize a WordPress theme). Thank you for this.

  11. Hi there,
    Its an awesome feature but I believe that you have to improve it more by adding some more drag and drop options.