David Stockdale's Scrapcode

Adding custom colour Palette to child theme

If your like me you will find a lot of the guides on how to add custom colours to your child theme.

Simply add a file named “theme.json” to your child theme (make sure it’s not theme.json.txt).

The file should be placed just into the child theme surface level (right besides your functions.php file).

This file should contain something along the lines of this:

{
    "version": 2,
    "settings": {
        "color": {
            "palette": [
                {
                    "name": "RCVDA Orange",
                    "slug": "rcvda-orange",
                    "color": "#F3A00A"
                },
                {
                    "name": "RCVDA Blue",
                    "slug": "rcvda-blue",
                    "color": "#1A4086"
                },
                {
                    "name": "RCVDA Red",
                    "slug": "rcvda-red",
                    "color": "#DA1E15"
                },
                {
                    "name": "RCVDA Light Blue",
                    "slug": "rcvda-light-blue",
                    "color": "#A8C1D9"
                }
            ]
        }
    }
}

This should add your custom colours as options on the colour palette.

Hopefully this makes page/post editing much easier for us all.

Leave a Reply