Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Python Tk Label - font size and color

  • config
  • color
  • font
import tkinter as tk

app = tk.Tk()
app.title('Label with font')

label = tk.Label(app, text='Some text with larger letters')
label.pack()
label.config(font=("Courier", 44))
label.config(fg="#0000FF")
label.config(bg="yellow")

app.mainloop()