I am looking for a solution to change the background and font color of a cell based on hex-values in another cell.

I am managing a google spreadsheet for an online basketball league. I have several sheets where there should be formatting based on the team name. For example, in the standings, the cell with the team name should appear in the teams' colors. With conditional formatting I am able to say (sloppy way:) if team name = xyz -> background color = #aaaaaa, font color = #bbbbbb

I want to have a single sheet where I can "store" these team colors, so if a team has a change in their team art, I don't have to change the conditional formatting on 100 different sheets, but just on a "color" sheet and everything gets updated after that.

So in the end, I want to have a sheet named "color" (or whatever) where I have 3 rows "team name", "color 1" and "color 2". If I change values in these cells, the whole document should update all cells where these team colors are used.

Does anybody have a solution for this?


To play with hex values you need to add this add-on to your spreadsheet: https://chrome.google.com/webstore/detail/

TeamColor is a Google Spreadsheet add-on for color management. Type a color code in Hex into a cell. Its background color will change to that color code. This is very useful for sharing color palette with teammates in developing apps, websites and anything else colorful. Moreover, it has also provide custom formula for color manipulation. You could even make a colorful spreadsheet with gradient color like the screenshot.

Input examples:
=colorSetOpacity(50, "#7EAC000")


| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.