import tkinter as tk
def create_yellow_box(parent, text, extra_style=None):
box = tk.Label(
parent,
text=text,
bg="yellow",
fg="black",
font=("Arial", 16),
width=25,
height=2,
anchor="center"
)
if extra_style:
box.configure(**extra_style)
box.pack(pady=5)
def main():
window = tk.Tk()
window.title("رنگ")
window.geometry("400x250")
window.configure(bg="white")
container = tk.Frame(window, bg="white")
container.pack(expand=True, fill="both", padx=20, pady=20)
create_yellow_box(container, "رضا")
create_yellow_box(container, "هادی")
create_yellow_box(container, "هوشنگ")
window.mainloop()
if __name__ == "__main__":
main()