In this material design snippet designed by Ives van Hoorne when you click on any of the buttons on the four corners the colour of the button fills the background with that colour.
If you are having trouble with the pen, try the archived copy on GitHub
Button to Background Colour Snippet
See the Pen Material Design Bubble Animation by Ives van Hoorne (@CompuIves) on CodePen.0