Tkinter above a certain font size the color attribute is ignored

Viewed 28

I'm working on a digital clock that is centered and full screen on whatever display it is run on. I need the font to be large for the clock to be readable from a distance. If I make my font size higher than 130 in the code below, I lose the green text color (defaults to white). Any ideas?

# importing tkinter module
from tkinter import *

# importing strftime function to
# retrieve system's time from time import strftime

# creating tkinter window
root = Tk()
root.title('Clock')
root.attributes('-fullscreen', True)
root['bg'] = 'black'

# This function is used to
# display time on the label
def time():
    string = strftime('%H:%M')
    lbl.config(text = string)
    lbl.after(1000, time)

# Styling the label widget so that clock
# will look more attractive
lbl = Label(root, font = ('helvetica', 130, 'italic'),
            background = 'black', 
            foreground = '#072109')

# Placing clock at the centre
# of the tkinter window
#lbl.pack(anchor = 'center')

lbl.pack(expand = YES)
time()

mainloop()
0 Answers
Related