Beispiel #1
0
def print_hcl_hl_grey():
    chart = Image.new("HSV", (depth, depth))

    for l in range(depth):
        for h in range(depth):
            rgb = colourx.hcl_to_rgb((h, 255, l))
            chart.putpixel((h, depth-1-l), (0,0,colourx.get_lum(rgb)))

    chart.convert("RGB").save("assets/hclhlgrey.bmp")
Beispiel #2
0
def print_hsv_hv_grey():
    chart = Image.new("HSV", (depth, depth))

    for v in range(depth):
        for h in range(depth):
            rgb = colorsys.hsv_to_rgb(h/255.0,1,v/255.0)
            chart.putpixel((h,depth-1-v), (0, 0, colourx.get_lum((rgb[0]*255, rgb[1]*255, rgb[2]*255))))

    chart.convert("RGB").save("assets/hsvhvgrey.jpg")