Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generator of HSL color palette/panel image
from PIL import Image
import colorsys
width = 360
height = 100
image ="RGB", (width, height))
for y in range(height):
for x in range(width):
color = colorsys.hls_to_rgb(x / 359, abs((y/100) - 1), 1)
image.putpixel((x,y), (int(color[0] * 255), int(color[1] * 255), int(color[2] * 255)))"ColorPalette.png", "PNG")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment