[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

WordPress. How to change chart colors

This tutorial shows how to change chart colors in WordPress.

WordPress. How to change chart colors

  1. Navigate to WordPress admin section and go to Appearance->Editor, on the right under themeXXXXX you will see post_masonry_view.php file:

    Wordpress._How_to_change_chart_colors-1

  2. Open post_masonry_view.php file and look for this code:

    $colorSetsPie = array(
    array(
    'skill_color' => 'rgba(26, 50, 56, 1)',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => 'rgba(26, 50, 56, 1)',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => 'rgba(26, 50, 56, 1)',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => 'rgba(26, 50, 56, 1)',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    )
    

    WordPress._How-_to-_change_chart-_colors-2

  3. In order to change chart background color, you will have to change every rgba (26, 50, 56, 1) color in the above code to the one you need. You can use this convertor Click here to convert a hex color string (e.g. “FFFFCC”) to numeric RGB value.

  4. Then, look for this code in order to change skill border color:

    $colorSetsDoughnut = array(
    array(
    'skill_color' => '##21bee8',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => '#21bee8',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => '#21bee8',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    ),
    array(
    'skill_color' => '#21bee8',
    'base_color'  => 'rgba(255, 255, 255, 0)'
    )
     

    In that code you have to change every #21bee8 color code to the one that you need:

    WordPress._How-_to-_change_chart-_colors-3

  5. Once you are done, click on Update file button and check your chart section, colors will be changed.

Feel free to check the detailed video tutorial below:

WordPress. How to change chart colors