could you send me minimal code for color picker

20 views
Skip to first unread message

Oliver

unread,
Sep 10, 2022, 2:10:21 PM9/10/22
to Kivy users support
i am unable to use color picker so i need minimal eg of colorpicker

Elliot Garbus

unread,
Sep 10, 2022, 8:40:01 PM9/10/22
to kivy-...@googlegroups.com

Let me know if this helps:

 

from kivy.app import App
from kivy.lang import Builder

kv =
"""
BoxLayout:
    orientation: 'vertical'
    ColorPicker:
        id: cp
    Label:
        size_hint_y: None
        height: 30
        text: f'Color with hex value: {cp.hex_color} selected'
"""


class CPApp(App):
   
def build(self):
       
return Builder.load_string(kv)


CPApp().run()

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/08854b27-c1a5-4112-96f8-c6ac415a0ed9n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages