Issues with Background Colour for buttons

The widget key is not accessible on the front end, so you can’t do that directly. You would need to use the context of other items around your buttons, or possible nth-of-type selectors to pick out your buttons…which becomes very dependent on your exact code and situation.

Here’s an example of using nth-of-type to “grab” different areas of the app to apply formatting.
https://mathcatsand-examples.streamlit.app/formatted_container

Feel free to create a new thread with your code if you need help applying the concept.