ColorPicker#
Open this notebook in Jupyterlite | Download this notebook from GitHub (right-click to download).
import panel as pn
pn.extension()
The ColorPicker
widget allows selecting a color using the browser’s color-picking widget support.
Discover more on using widgets to add interactivity to your applications in the how-to guides on interactivity. Alternatively, learn how to set up callbacks and (JS-)links between parameters or how to use them as part of declarative UIs with Param.
Parameters:#
For details on other options for customizing the component see the layout and styling how-to guides.
Core#
value
(color): A hexadecimal RGB color value
Display#
disabled
(boolean): Whether the widget is editablename
(str): The title of the widget
When clicked the ColorPicker
opens a browser-dependent color-picking widget:
colorpicker = pn.widgets.ColorPicker(name='Color Picker', value='#99ef78')
colorpicker
ColorPicker.value
returns a hexadecimal RGB value:
colorpicker.value
Controls#
The ColorPicker
widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively:
pn.Row(colorpicker.controls(jslink=True), colorpicker)
Open this notebook in Jupyterlite | Download this notebook from GitHub (right-click to download).