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

Google Sheets Docs Slides Color Palette

Google Apps Script – Google Workspace Standard Color Palette Hexadecimal Color Codes

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.

Finding the Hexadecimal Color Code in Google Sheets, Docs or Slides

  1. Select the pallet button in either the fill or letter button.
  2. Select the desired color.
  3. Go back into the pallet selector.
  4. Click the custom plus (+) button.
  5. The value will be displayed.

This can be useful to gather the colours you need for your script quickly.


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!

Looking to learn more about Google Apps Scripts in a more structured format? Udemy has some great courses that can get you from the basics to a real Google Apps Script pro.

Got a more specific problem you need help with, but don’t have the time to develop the skills? Make an enquiry on my 'Hire me!' page. I occasionally pick up projects. Alternatively, Fiverr’s your best bet to find a skilled Google Apps Script developer to solve your problem quickly and professionally. *

*The above affiliate links have been carefully researched to get you to what you specifically need. If you decide to click on one of these links it will cost you just the same as going to the site. If you decide to sign up, I just get a little pocket money to help pay for the costs of running this website.


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

  1. Thank you! This totally saved me 🙂

  2. Thank you for doing this (and letting me find it via google search). This all has been such a pain, working across platforms and products. Much appreciated.

Leave a Reply

%d bloggers like this: