Botão piscante tkinter - samur2d2/Python GitHub Wiki
import tkinter as tk
import threading
from time import sleep
def cor():
color = True
while True:
if color:
buttonA.configure(bg="gray")
color = False
else:
buttonA.configure(bg="cyan")
color = True
sleep(1)
root = tk.Tk()
root.geometry("250x100")
buttonA = tk.Button(root, text = "Color", bg = "blue", fg = "red")
buttonB = tk.Button(root, text="Click to change color")
buttonA.pack(side=tk.LEFT)
buttonB.pack(side=tk.RIGHT)
threading.Thread(target=cor).start()
root.mainloop()