I have an idea but not sure how to make it or what to use. Maybe people here can help me with some ideas on how to think when building this.

On a website I will have a newsletter template.
There will be one area with the actual newsletter and one area where the user can edit settings.

The user should be able to change colors of the css file and I want the changes to be updated when the user is clicking on a new color.
Let's say I have one color called happy, one called dark and one called summer.

When the user is clicking on summer in the settings area, I want my template (in the template area) to show the new settings for that choice.

Would be great to also have a filed where the user can fill in a headline and when they write, the headline is changing to their text that was written in the field on the settings area.

Not sure if it's possible to see the text being updating when the user is typing or do they have to click a button to make the changes appear?

I'm not sure what to use to make this page and where to start. But my plan is to use php and also a MySQL to save the settings for the final template when the user is satisfied.

Any ideas here?