Google Apps Script: Google Standard Color Palette Picker for Sidebar and Dialog Boxes in Google Sheets, Google Docs and Google Slides (Updated Feb 2022)

Google Apps Script: Dev Tools, Color Picker, Side Bar, Custom Prompt, HtmlService, onOpen, Sidebar, Dialog Box

I wanted to update one of my free Google Add-on apps that works with colour. What I had is just the standard HTML color input element where the user selects from the palette and that hexadecimal colour code is returned to Google Apps Script to be used in the App. The problem is that it is really hard to get a good colour match between the palette and Google’s own colour range that is accessible from the fill or text colour buttons.

Take a look at the comparison between the HTML color input element and the Google Sheet background colour palette in the image below.

Color input vs google sheet palette colours

That’s not a user-friendly tool to match colours with the standard Google palette.

So in the back of my mind, I had always wanted to create a tool for a sidebar or dialogue box that would allow the user to easily access the standard colours or use the custom palette provided by the HTML color input.

After finding a bit of time in my recent summer break I came up with this.

Google Color array picker

And this is how it looks in action:

(Note: add-ons has been updated to Extensions)

Continue reading “Google Apps Script: Google Standard Color Palette Picker for Sidebar and Dialog Boxes in Google Sheets, Google Docs and Google Slides (Updated Feb 2022)”

Google Apps Script: Hexadecimal Color Codes for Google Docs, Sheets and Slides Standard 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:

Continue reading “Google Apps Script: Hexadecimal Color Codes for Google Docs, Sheets and Slides Standard Palette”