I'm trying to write a script which will take a column of hex codes and color the adjacent column's background color to be that hex code color, but I'm just not sure how to do it.
I've been looking at these:
1) https://developers.google.com/apps-script/reference/spreadsheet/range#setbackgroundcolor
2) https://developers.google.com/apps-script/reference/spreadsheet/range#getcellrow-column
3) Google Spreadsheet: Script to Change Row Color when a cell changes text;
But haven't really hade any progress. Any help would be appreciated!
Thanks!
Something like this should solve your problem:
Although, this only colors one cell at a time, but it portrays how you can set a background color based on cell input. Depending on your use case, whether you are copy-pasting multiple hex codes at a time or whether you have an existing list of hexcodes and you would like to show their color against those, using
getCell(row,column).setBackground(String)
should be able to help you out.