Custom CSS/colors based on profile

What would be a possible way to have a specific CSS/Theme/colors depending on the user profile selected?

Something has simple as changing the header/footer with a different background color for instance.
It should work with both the JupyterLab view and the Notebook view.

FYI, I use z2jh deployed using the helm chart, and have a few user profiles configured in the config files, and some customization in the pre_spawn_hook.

thanks for any pointers.

You should be able to configure Z2JH to pass the profile to the singleuser server, e.g. as an environment variable. You’ll then have to configure/extend JupyterLab/notebook based on that environment variable- this part is unrelated to JupyterHub, it’s all in your singleuser container image which means you can easily test it locally.

1 Like

thanks.
we do indeed use the profiles in z2jh as you mention.
You right that what I am wondering is where the CSS/HTML code/config can be changed in Jupyter Lab.
I guess I’ll look at how to configure a custom theme and switch it in the spawner.