I’m thinking of using a color picker as preview option in a HTML template to change the color of a specific element, such as the common options in many templates here that ue color picker to change colors of some elements as an unlimited colors possibility. I tried to understand a code used in some template, but couldn’t understand.
Which bit are you having trouble with?
You would use PHP to do this server side, which I imagine what most WP designers use to easily change CSS variables.
Let me know if you need a demo?