[Support request] colours palete

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support colours palete

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30844
    TWarrior
    Participant

    Hello,

    I use a code to set the colours palette in GP and GBlocks, but it seems not working in WP Show Post…

    which code should I use to set colours palette in WP Show Post?
    https://share.getcloudapp.com/JruDv7kL

    this is my actual code:

    add_action( 'after_setup_theme', function() {
        add_theme_support( 'editor-color-palette', array(
            array(
                'name'  => __( 'Rojo Pri' ),
                'slug'  => 'rojo_main',
                'color' => '#ea2121',
            ),
            array(
                'name'  => __( 'Rojo Claro' ),
                'slug'  => 'rojo_ligth',
                'color' => '#f94141',
            ),
            array(
                'name'  => __( 'Rojo Oscuro' ),
                'slug'  => 'rojo_oscuro',
                'color' => '#bf0202',
            ),
            array(
                'name'  => __( 'Verde' ),
                'slug'  => 'verde',
                'color' => '#bf0202',
            ),
            array(
                'name'  => __( 'GRIS' ),
                'slug'  => 'gris',
                'color' => '#3f3f3f',
            ),
            array(
                'name'  => __( 'Gris Claro' ),
                'slug'  => 'gris_light',
                'color' => '#b7b6b5',
            ),
        ) );
    } );
    
    /* 8 colours */
    add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' );
    function tu_custom_color_palettes( $palettes ) {
    	$palettes = array(
    		'#000000',
    		'#FFFFFF',
    		'#ea2121',
    		'#bf0202',
    		'#bf0202',
    		'#1e72bd',
    		'#3f3f3f',
    		'#b7b6b5',
    	);
    	
    	return $palettes;
    }

    thanks

    #30871
    elvin
    Moderator

    Hi there,

    WPSP uses wp-color-picker which uses this – https://github.com/automattic/Iris – which is actually bundled with WP since 3.5. It’s basically the default WP color picker.

    This isn’t something that can be changed on the theme’s end of things. It’s a WordPress core change which is out of our scope of support for customization, unfortunately.

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