Changing the color based on a spreadsheet cell data

I’m attempting to make either a map marker or a button/icon have a different color based on the text in a cell of a connected spreadsheet.
For a map marker, the formula is a connection to the SHEETNAME.data Somehow I have to add some code that brings in the cell data.

Also, for the button background color I can make a connection to the cell fields but I don’t know how to write the code for it.
If anyone knows of a tutorial that has something along these lines, please share. thanks

Hi, you can do the following:

  1. Create a binding (use the plug icon next to the color)
  2. Write the following formula if([your_variable] = 'your_value_as_string', 'color_code_if_true', 'color_code_if_false')

Thanks for replying. What would that variable look like and how woukd that connect to the cell.
…so somehow i would make a variable that looked at the cell which has 2 options, either Activated or Not Activated.
As i get further into the programming, that cell would be able to be changed by the same button whose color is being changed.

the button says Not Activated in green . Then you can press it and it updates that cell and chnages the color of the button.

…just getting started on this as i learn weweb