Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # tk_green_blast.py
- # Imports
- from tkinter import *
- import time
- ww = 600
- hh = 600
- root = Tk()
- root.title('green blast')
- root.geometry(f'{ww}x{hh}+0+0')
- canvas = Canvas(root, width=ww, height=hh, bg='black')
- canvas.pack()
- x = ww//2
- y = hh//2
- while 1:
- radius = 1.5
- gradient = 255
- while gradient > 0:
- t = time.time() + 0.009
- canvas.delete('all')
- color = f"#00{gradient:02x}00"
- canvas.create_oval(x - radius, y - radius, x + radius, y + radius, fill=color, outline="")
- gradient -= 1
- radius -= 1
- while t > time.time():
- canvas.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement