Using a color table
In Looking up color table, we covered how to use a color table to reference to make palettes using the functions described in Playing around with colors in VBA. But that was in Excel – now here’s the Google Apps Script Version.
We’ll use the same workbook as in Google Script Color Ramp. The color table is one of the tabs below.
This code produces the example above. It has many thousands of lines, a bit too many for GAS to be effective. I am using caching for both data and cell properties, and using Data manipulation Classes in Google Apps Script means that the GAS code is almost identical to the VBA code. It took about 10 minutes to convert this – but a lot longer to run it.