from kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text='Hello, World!', font_size=50, halign='center', valign='center') if __name__ == '__main__': MyApp().run()
from kivy.app import App from kivy.uix.label import Label from kivy.core.text import LabelBase from kivy.utils import get_color_from_hex class MyApp(App): def build(self): LabelBase.register(name='MyriadPro', fn_regular='MyriadPro-Regular.otf') return Label(text='Welcome to Kivy!', font_name='MyriadPro', font_size=30, color=get_color_from_hex('#FF7F50')) if __name__ == '__main__': MyApp().run()In both of these examples, the Kivy package library is used to create a Label with various properties and customize its appearance.