Labs and Works done in Physical Computing Class at SVA IXD, by Beatriz Vizcaíno.
Color Swapper!
When determining colors we use the R,G,B or hexadecimals.The purpose in this part of the lab, was using variables that augmented during an amount of time, creating a unified color, Purple!
The purple is acquired by the combination of red and blue, so if I wanted to create purple out of red I had to increase the B, for the red and the R to the blue. The augmentations of the numbers was done with the variable float, which allows us to include numbers with decimals to the program. At the end of the program we needed to create the same effect, but from purple to the original colors, this was done with the help of an if statement that recognized when the R and B variables were in a specific value. If the condition was true, the augmentR function was equal to augmentR*-1, action that would reverse the colors.