That’s honestly surprising (pleasantly, I guess?) but perhaps we ought to raise the possibility of deprecating and discouraging the yaml format for themes if it can’t have full parity.
I’ve discovered that the Whisker object settings can be output to json, which I show below after setting the background color to its complement. (Note: This color is meant to be DARK_STYLE.background_color in panel/template/fast/theme.py.)
Find the opposite/complement of the theme background color:
Using color inversion oneliner from SO post:
bkgd = "#181818" # e.g. `DARK_STYLE.background_color` in fast/theme.py
whiskers = f"#{(int(bkgd.lstrip('#'), 16)^0xffffff):06X}"
whiskers
>>>'#E7E7E7'
Set the line color of the Whisker object and output its json:
from pprint import pprint as pp # just to get nicer post output ;)
from bokeh.models import Whisker
W = Whisker(line_color=whiskers)
W.line_color # check new value assigned
>>>'#E7E7E7'
>>> pp(W.to_json(include_defaults=True))
{'base': {'field': 'base'},
'coordinates': None,
'dimension': 'height',
'group': None,
'id': '1005',
'js_event_callbacks': {},
'js_property_callbacks': {},
'level': 'underlay',
'line_alpha': {'value': 1.0},
'line_cap': {'value': 'butt'},
'line_color': {'value': '#E7E7E7'}, # saved!
'line_dash': {'value': []},
'line_dash_offset': {'value': 0},
'line_join': {'value': 'bevel'},
'line_width': {'value': 1},
'lower': {'field': 'lower'},
'lower_head': {'id': '1006'},
'name': None,
'source': {'id': '1008'},
'subscribed_events': [],
'syncable': True,
'tags': [],
'upper': {'field': 'upper'},
'upper_head': {'id': '1007'},
'visible': True,
'x_range_name': 'default',
'y_range_name': 'default'}
Add above specs under attrs.Whisker key. (not tested)