I am working on an application that creates a website template and there is an options page where the user will be able to change colors (via a colorpicker script) of the stylesheet. One option I found is to use PHP to control CSS variables (as described here). I was wondering if there are other options, possibly better options to do what I want to do.

I am working on an application that creates a website template and there is an options page where the user will be able to change colors (via a colorpicker script) of the stylesheet. One option I found is to use PHP to control CSS variables (as described here). I was wondering if there are other options, possibly better options to do what I want to do.

Thanks for any ideas.

I have just changed one of my sites and started afresh with using a THEME.php file to save five colours then to import the colours into the stylesheet:

How to read the genrated PHP file using PHP and to save it as a CSS file.

Currently I use FireFox:1. display the contents2. click on THEME.php file3. highlight and copy all contents into a keyboard buffer4. save the keyboard buffer to the style.css so that it can be validated using "www.validator.w3.org/"