Google-sheets – How to color an adjacent cell based on a 6-digit hex number without adding the “#”

formattingformulasgoogle sheetsgoogle-apps-script

I've looked at a few things (this link, WA's Colorize a cell in Google Spreadsheets based on cell data, and this link), but haven't been able to quite get the behaviour I want in Google Sheets. What I want to do:

  1. Enter six characters (e.g. 00B6FF) into a cell without adding a # before them
  2. Have the cell to the right of that cell get coloured with the corresponding hex value.

I'm a designer, so not too savvy with the scripts, but I'm up for trying. Tried each of those links above, but the only one I got to work was the gist one, but I don't want it colouring the text.

Can anyone help me figure out how to do this?

Best Answer