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.
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.
And this is how it looks in action:
(Note: add-ons has been updated to Extensions)