Color¶
Simple example:
from flexx import ui, event
class Example(ui.Widget):
def init(self):
self.c = ui.ColorSelectWidget()
class JS:
@event.connect('c.color')
def _color_changed(self, *events):
self.node.style.background = events[-1].new_value
-
class
flexx.ui.
ColorSelectWidget
(*init_args, **kwargs)¶ Inherits from:
Widget
A widget used to select a color.
This uses the HTML5 color input element, which is supported at least on Firefox and Chrome, but not on IE/Edge last time I checked.
-
color
¶ property – The currently selected color.
-
disabled
¶ property – Whether the color select is disabled.
-