Skip to content

Instantly share code, notes, and snippets.

@parasyte
Created March 9, 2012 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parasyte/80fa53032ec820d28950 to your computer and use it in GitHub Desktop.
Save parasyte/80fa53032ec820d28950 to your computer and use it in GitHub Desktop.
grays.py
import Tkinter as tk
root = tk.Tk()
canvas = tk.Canvas(root, width=128, height=256, highlightthickness=0)
canvas.pack()
for y in range(0, 256):
color = "#%02X%02X%02X" % (y, y, y)
canvas.create_rectangle(0, y, 128, y + 1, fill=color, width=0)
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment