Use colorsys library’s hsv_to_rgb() function and loop to draw the following square that gradually transitions hue value from 0 to the left to hue value 1 on the right.
In this python turtle project, you are going to draw a 7-color rainbow and a 49-color rainbow. You need to know for loop, drawing circle, and converting HSV (Hue-Saturation-Value) colorspace
Can I have the commands?
import turtle
turtle.setup(1000,1000)
turtle.setworldcoordinates(-200,-150,200,250)
turtle.tracer(0,0)
turtle.begin_fill()
turtle.circle(100,90,200)
turtle.right(270)
turtle.circle(100,90,200)
turtle.end_fill()
turtle.up()
turtle.goto(-10,0)
turtle.down()
turtle.seth(45)
turtle.begin_fill()
turtle.circle(100,90,200)
turtle.right(270)
turtle.circle(100,90,200)
turtle.end_fill()
turtle.up()
turtle.goto(-20,0)
turtle.down()
turtle.seth(90)
turtle.begin_fill()
turtle.circle(100,90,200)
turtle.right(270)
turtle.circle(100,90,200)
turtle.end_fill()
turtle.pensize(20)
turtle.up()
turtle.color(“white”)
turtle.goto(-200,56)
turtle.down()
turtle.fd(400)
turtle.pensize(20)
turtle.up()
turtle.color(“white”)
turtle.goto(-200,40)
turtle.down()
turtle.fd(400)
turtle.pensize(20)
turtle.up()
turtle.color(“white”)
turtle.goto(-200,24)
turtle.down()
turtle.fd(400)
turtle.update()