Ability to set DefaultColorPrimary / ColorPrimary in custom theme

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.1
Operating system and version (eg, Ubuntu 20.04): official nextcloud-fpm docker image
Apache or nginx version (eg, Apache 2.4.25): caddy in front of container
PHP version (eg, 7.4): 8.1

The issue you are facing:
I’m trying to create a custom theme for nextcloud which can reside in themes/mytheme.
I know that the example provided in that folder is based on the legacy theme format, which might be phased out in the future.

I’m trying to do some light theming, mainly changing color, title, slogan etc.

Right now, I am sending a server.css with overwritten CSS values for colors, but that requires overwriting the colors by hand. It also has nextcloud still serving the default color scheme from my main theme, which I set up via the admin theming interface.

Since the theming app cannot be disabled anymore, full manual theming does not appear to be present. Creating a custom app would also not work in my use case.

Manually supplying CSS variables doesn’t make use of the automating the theme app provides, namely providing one HEX color and the app does the magic of creating a fitting color scheme, coloring the .svg icons etc.

Thus, the question: Can I provide a value for the primary color, which nextcloud then uses to do its magic?

Background: I’m using domain based theming with a tweak in the config.php which routes to themes/domain