Here is one way to do it, but I don’t like it terribly. I am not sure if a) it covers all the colorbars available in holoviews (matplotlib, bokeh, colorcet, cmocean) and b) it would be nice to have an option to set in the hvplot or holoviews opts command
from matplotlib import colors
import numpy as np
divnorm = colors.TwoSlopeNorm(vmin=-8., vcenter=0., vmax=2)
levels = np.arange(-8, 2.5, 0.5)
colors = [colors.to_hex(c, keep_alpha=True) for c in plt.cm.coolwarm(divnorm(levels))]
test_array.hvplot(clim=(-8, 2), cmap=colors)