Change text color in Python Kivy

Viewed 126

I'm currently programming on a Kivy Project. To make it look better I would like to know how to change the text color of a button. The button is supposed to be white at the end with black text, however I just can't find a solution on the internet.

1 Answers

On a .kv file, you would just do:

Label:
    text: 'Blah Blah Blah'
    color: 1, 0, 1, 1

On a .py file, you would just do:

def __init__(self):
    #don't forget the super()
    self.label = Label(text='BlahBlahBlah', color=(1, 0, 1, 1)
    self.add_widget(self.label)
Related