There are many ways to do this! Here are a few examples:
How to use sliders from the ControlP5 library for Processing to dynamically change on-screen designs.
+ how to use background colors.
+ where to look up more ControlP5 features.
Link to code (with some added comments): gist.github.com/nataliefreed/ef0f9d9eb34875bf27b2
DraggableCircle example code used in the video can be found here: gist.github.com/nataliefreed/9633499