In this lab we will create a class that will represent colors and build a function to combine two colors.
RGB is a way of storing color data. R stands for red, G stands for green, and B stands for blue. Each color is given a value from 0 to 255.
You can use this tool to see the RGB values for different colors: https://www.rapidtables.com/web/color/RGB_Color.html
- Create a class,
Color
. - Instantiate at least 3 colors.
- Add attributes of r, g, and b to those instances.
- Create a function,
add_color
, which takes in two colors and returns a color that is the sum of the two reds, greens, and blues. Don't forget: the maximum value for R, G, or B is 255.