Google Apps Script: Hexadecimal Color Codes for Google Docs, Sheets and Slides Standard Palette

Google Sheets Docs Slides Color Palette

Google Apps Script – GSuite Standard Color Palette

I am planning on updating a few Google Apps Script projects and updates soon. To accomplish them, I needed to get the full array of colours and their hexadecimal codes from the Google Sheets, Docs and Slides dropdown menus for the text and fill colours.

Google Sheets Color Palette

I wanted to be able to easily access the hexadecimal codes for each of the custom colours that Google has.

In this short post, I want to share a number of array and object formats along with a quick Logger.log example for each one.

However, first of all here is the Google Sheet with the colours along with their hexadecimal name and the name that Google gives the colour.

You can check out the file here:

Google Sheets, Docs and Slides Standard Colours

Just go to File > Make a copy so you have a copy of your very own.

Google Standard Color Array

For ease of use, I have left the first row and column empty so that it matches the dropdown menus for fill and text colour. You can also use the guide in the sheet to compare.

This way, going from left to right and top to bottom you don’t have to worry about starting from zero.

Google Standart Color Object

In the next example, I used a straight Javascript object. The key is the name that Google has assigned the colour and the vale is the hexadecimal colour code.

Here, you can see that we call the hexadecimal colour by using the Google naming convention for the colour.

Google Standard Array with both Name and Hex Colour

This array is a replica of the one that was used to populate the bgcolors tab. Every even row contains the hexadecimal colour and the odd row contains it’s corresponding Google naming convention.

Probably not as useful, but it might be good if you want to iterate through a row or column of colours and their names.


You should also be able to access these files from your copied version by going to Tools > Script editor.

I hope you find this useful in your own projects.

I’ll be sharing how I used this data shortly. I’m quite excited about sharing it, but I want to write it all up good and proper for you. Hold tight!

Update!!! Here it is!


One thought on “Google Apps Script: Hexadecimal Color Codes for Google Docs, Sheets and Slides Standard Palette”

Leave a Reply