This can be done with VBA.
1) You will need the Developer tab
Go to File > Options > Customize Ribbon > Check off Developer
2) Go to the Developer tab and press Visual Basic
3) Go to the Sheet or ThisWorkBook and copy in the following code (cited from https://www.mrexcel.com/board/threads/can-you-change-a-cell-color-just-by-clicking-it.407894/):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Target.Interior.ColorIndex = 3
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Target.Interior.ColorIndex = 4
End Sub
4) Go back into the Excel spreadsheet and Double Click will turn it red and Right Click will turn it green. (a bit different than your ask, but works well).
If this is helpful please accept answer.