Support » Theme: GeneratePress » Default colorpicker colors

  • Resolved Guido

    (@guido07111975)


    Hi there,

    I’m using this snippet for changing my default colors in the Customizer, but there’s no effect.

    
    add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' );
    function tu_custom_color_palettes( $palettes ) {
    	$palettes = array(
    		'#000000',
    		'#FFFFFF',
    		'#F1C40F',
    		'#E74C3C',
    		'#1ABC9C',
    		'#1e72bd',
    		'#8E44AD',
    		'#00CC77',
    	);
    	
    	return $palettes;
    }
    

    Have added this in file functions of my child theme.. Am I doing something wrong?

    Guido

Viewing 11 replies - 1 through 11 (of 11 total)
  • Leo

    (@leohsiang)

    Hi there,

    Just tested your code using the Code Snippets plugin it worked as expected.

    Can you use the Code Snippets plugin to test first?

    What version of GeneratePress are you using?

    Thread Starter Guido

    (@guido07111975)

    Hi Leo,

    Wait… I just found out how it works… It’s the 8 colors underneath the color picker field… And it does work properly.

    But I thought it was changing the DEFAULT color of each element, but that’s not how it works.

    So is there a way to change the DEFAULT color of each element?

    Guido

    Leo

    (@leohsiang)

    Unfortunately not.

    Thread Starter Guido

    (@guido07111975)

    Understood. Guess it will be nice to make this possible in a future release 😉

    Guido

    David

    (@diggeddy)

    Hi there,

    i think you will be excited to see what will be available in GP 3.1:

    https://generatepress.com/generatepress-3-1-global-colors-dynamic-typography/

    No more need to add code to update the color pallet, and all colors will be Global ( CSS Variables ) so you can restyle theme colors by simply editing the color pallet.

    Thread Starter Guido

    (@guido07111975)

    Hi David…

    YES, this will make me very happy. Because this means I don’t have to add many lines of CSS to change navigation colors. FYI: in most of my cases GP premium is overkill.

    Guido

    David

    (@diggeddy)

    Glad to hear that!

    Thread Starter Guido

    (@guido07111975)

    Does mean that there’s some extra work for many developers, removing custom CSS and setting color and typography options again..
    And hopefully this great update wil not break current settings.

    Guido

    David

    (@diggeddy)

    When you update the theme, it will maintain any static colors you have set in the Customizer.

    If you have custom CSS then that will still apply.

    You will need to remove CSS and manually update the customizer colors if you want to use the new dynamic Color pallet

    Thread Starter Guido

    (@guido07111975)

    Hi David / @diggeddy

    There are many color options, a reset button (back to default color scheme) would be nice, in cases you want to start over because you’ve messed up. Can I report this via you or should I go to the GP website?

    On the other hand… al options do have a default value… but it takes some time to reset all.

    Guido

    Elvin

    (@ejcabquina)

    Hi Guido,

    There are many color options, a reset button (back to default color scheme)

    We actually have something like this but its a feature for the premium version.

    The premium version has some sort of “Reset” button for all customizer settings and a “Default” button to revert to default. 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.