How do Template parameters header_color and header_background work?

I finally got to try out panel templates. Really Nice!!
I can’t figure out how to set the header_color and header_background parameters.
They seem to have no effect.

Do I need to explore themes to try and make some minor changes?

I tried with this

import panel as pn
pn.extension()

tmpl = pn.template.VanillaTemplate(title='color')
tmpl.header_background = 'red'
tmpl.header_color = 'blue'
tmpl.main.append(pn.Row())
tmpl.show()

header background is working, but header color not

it seems it gets overriden

image

one solution is to use the important command in raw_css

import panel as pn
css = """ 
.title{color:blue !important; }
"""

pn.extension(raw_css=[css])

tmpl = pn.template.VanillaTemplate(title='color', header_color = 'blue')
tmpl.header_background = 'red'
tmpl.main.append(pn.Row())
tmpl.show()

Interesting. Passing the two parameters with the constructor

  • VanillaTemplate, Material template set the background, but not the color
  • GoldenTemplate sets neither