Save button color in Tinydb

Thanks for answering.
It works perfectly with a single button, but I want to do it with ten buttons (using AnyComponent)
This block should work to save the color of the button pressed, but it doesn’t work and I don’t know why.
Then I want to recover the buttons with the selected color