Hi thanx for you answer so far.
I have a follow up. I am using my kirby setup as a boilerplate and per project I swap only the css folders. That way all style related stuff is only in the assets folder.
Is there anyway to not have these colors listed in the php? That would make it allot easier because in multiple projects and can keep the config the same
You’ll need to have the colors as PHP values if you want to render a color picker with options. Otherwise you can just have a Select field with names like “color 1”, “color 2”, etc., but users of the Panel will have no idea what the colors look like.
You could define the colors in JSON or YAML and load that data using PHP, and also use the same data to generate the corresponding CSS. But that’s maybe harder than having it directly in PHP.
If you have this data in PHP, you could always render a HTML <style> element based on that, for example as CSS variables:
If you have multiple projects, you can import specific other php files into your main config, so while the main config remains the same, what you import for each can be different.