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.

Hire me for our next Google Workspace project.

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.

Create and Publish Google Workspace Add-ons with Apps Script Course 300px

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!

Create and Publish a Google Workspace Add-on with Apps Script Course

?You can support me for free by using this Amazon affiliate link in your next tech purchase :Computers & Stuff! ?

Need help with Google Workspace development?

My team of experts can help you with all of your needs, from custom app development to integrations and security. We have a proven track record of success in helping businesses of all sizes get the most out of Google Workspace.

Schedule a free consultation today to discuss your needs and get started or learn more about our services here.


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