edd-themedd icon indicating copy to clipboard operation
edd-themedd copied to clipboard

Color preset support within customizer

Open arraypress opened this issue 8 years ago • 5 comments

This is merely a feature suggestion that would be useful to have, and something I could contribute to in terms of presets for the theme.

Within the color options in the customizer, there are lots of color options to configure and it can be a bit overwhelming for first time users to setup. Due to this it would be useful to have the ability to include "presets" that could be selected from a drop down for pre-made color schemes. Ideally presets could be named, saved and loaded as well.

Just an idea for a potential future release, better to get it out the door first! :)

arraypress avatar Jun 19 '17 10:06 arraypress

I've definitely thought about doing this and won't dismiss it yet, so will tag for a future release. I'd actually prefer it being its own plugin or even just color schemes you can download and import from a resources section on themedd.com.

Here's my thinking:

  • Once color schemes are included they can't be removed since a user might be using it
  • If we want to change a color (perhaps our perception of the color scheme changes) we can't without backlash, since a user might have liked the previous color(s).
  • More color schemes would be expected or requested.

Right now it's simple - there's 1 base color scheme and a user has the ability to change the theme to the exact colors they need.

amdrew avatar Jun 20 '17 07:06 amdrew

Just for inspiration if you do decide to go through with this later, I quite like this method: http://deluxeblogtips.com/add-color-schemes-wordpress-theme/

The idea is that the select box for choosing the colour scheme doesn't actually output the colour CSS. Instead, it's just a method of changing the colours of the colour pickers to pre-defined values on a change event. So if you do change the colour scheme settings later (or remove one), it doesn't affect someone who's already using them, since they'd still have the colour pickers set to their chosen values.

ashleyfae avatar Jun 20 '17 09:06 ashleyfae

Thanks @nosegraze, will check it out.

amdrew avatar Jun 21 '17 04:06 amdrew

Just a slight update on this, I researched different ways of approaching this and decided that simply having a dropdown that loaded separate color scheme CSS files was the best route. The drop down/select recursively scans a directory for CSS files and displays the available options within the customizer. This has a few benefits over the above methods:

  • The CSS files can be cached and minified at server level, something not possible with dumping everything into the header.
  • It's easier for the users to create their own color schemes, since a boilerplate LESS file can be included with just needing the color variables to be switched out.
  • The header color dumping can be avoided, making for cleaner markup.
  • It dosen't override anything the user has already set within the customizer and they can easily tweak specific colors.

arraypress avatar Aug 09 '17 14:08 arraypress

I took that approach in one of my old themes. Can't remember which one. I liked it, though.

SeanChDavis avatar Aug 09 '17 15:08 SeanChDavis