Oct 28
Color Swatches
Fundamentals of Physical Computing
Lab Seven: Programing Lab 2, part 2: Color Swatches
Start with this simple drawing program with two buttons. There are two square buttons at the bottom of the screen. When the user clicks on the buttons a simple message is printed to the console.
- Pick two colors from the Color Selector on the Tools menu. You will have to remember the R, G and B values or the hex code from the Color Selector.
- Turn these buttons into color swatches for the two colors you picked from the Color Selector. When the user clicks on a swatch, they will be able to draw in the color of that swatch. You will have to add 3 variables to store the red, green, and blue color levels to store the current color that is being drawn in.
- Save As.. this sketch, naming it yourname-Swatches