How to change container color based on tag

@russian-dima Hi, I haven’t got the database fully set up yet as I’m trying to work out how to achieve what I am trying to do/there are a lot more elements to it including reference fields etc that I haven’t sorted yet. But I will have a tag field to specify genre of concert.

Do I need to create another DB with the colours stored and attached to the tags or can I put it in as a piece of code on the specific page that I need it.

I thought it might be something like

if item.genre = [Jazz] {
then.
$item ( ‘#BOX’ ). style . backgroundColor = “#00000” ;

and then repeat that for the different genres…

Would that work?