bokeh: [BUG] ColorPicker does not respect initial color

from bokeh.io import show
from bokeh.layouts import column, row
from bokeh.models import ColorPicker
from bokeh.plotting import Figure

plot = Figure(x_range=(0, 1), y_range=(0, 1), plot_width=350, plot_height=350)
line = plot.line(x=(0,1), y=(0,1), color="red", line_width=4)

picker = ColorPicker(title="Line Color", color="red")
picker.js_link('color', line.glyph, 'line_color')

show(column(plot, picker))

Picker initially displays as black. Probably a missing configuration in the widget init.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

Actually the error now is different:

bug_colopicker

MRE:

from bokeh.models import ColorPicker
from bokeh.io import show, output_file

output_file("colorpicker.html", mode="inline")
show(ColorPicker())