Making Indian Flag in Python
from tkinter import *
ws = Tk()
canvas = Canvas(
ws,
height=600,
width=900,
bg="#9adbd8"
)
canvas.pack()
canvas.create_rectangle(
100, 100, 800, 230,
outline="#e07810",
fill="#e07810")
canvas.create_rectangle(
100, 231, 800, 370,
outline="#f7fcfc",
fill="#f7fcfc")
canvas.create_rectangle(
100, 371, 800, 510,
outline="#0fa838",
fill="#0fa838")
img = PhotoImage(file="Spoke.png")
canvas.create_image(395,231, anchor=NW, image=img)
ws.mainloop()
Post a Comment