Python Turtle Workshop: HSL Color Wheel

Following sample code uses HSL color system to draw a fuzzy color wheel

Explore HSL colour

import turtle as t
import colorsys
def sector(radius, angle, color):
t.color(color)
t.begin_fill()
t.forward(radius)
t.left(90)
t.circle(radius, angle)
t.right(90)
t.backward(radius)
t.end_fill()
def wheel(radius, sat=1.0, light=0.5, N=24):
"A colour wheel of radius with N sectors"
for i in range(N):
color = colorsys.hls_to_rgb(i/N, light, sat)
sector(radius, 360/N, color)
t.tracer(0)
t.ht()
'''
wheel(200, light=0.5, sat=1.0, N=36)
t.update()
t.done()
'''
rings = 70
for r in range(rings):
radius = 300*(1-r/rings)
wheel(radius, light=(rings-r-1)/rings, sat=1.0, N=150)
t.update()
t.done()

Result of one call for function wheel.

HSL Color Wheel

Result of 70 loop calls for function wheel.

HSL Fuzzy Color Wheel