Activity 9 - Coloring your mandala flower

alt text width=“70%”

Now that we have the shape of a mandala flower, it’s time to color it! We’re still going to use the turtle.color() method; however this time we’re going to use an RGB value instead of a string color value, so that we can produce a larger variety of colors.

RGB (Red-Green-Blue) colors

In primary school, you might recall that by mixing colors together, you can produce new colors. For example, combining red and blue together make purple. We can also change the amount of red and blue mixed together to create different shades of purple. The computer does something similar to produce colors. By combining various intensities of red, green, and blue, we can create different colors, such as powder blue, golden yellow, and salmon pink. Click here to see the colors and their corresponding hexadecimal form.

In the turtle.color() method, we can specify three integer arguments corresponding to the amount of red, green, and blue to mix. Each integer must be between 0 and 255 inclusive. One example can be turtle.color(30, 100, 238), which produces a dark shade of blue.

Update your mandala flower to use a color of your liking. Feel free to experiment with different colors!