How to set a background color based on post category

Hi Bricks community! :wave:t2:

How can I set a specific background color e.g. for a card in a post query based on a category?

:arrow_right: So that different cards for different categories are color coded :red_circle::large_blue_circle::yellow_circle:. And they are easier to distinguish for visitors.

Only with a php-snippet or is there an easier way for a non-php-user?

Thank you very much!

Bricks regards,
Heiko