How to dynamically change color in print designer

We want to use the print designer to print kanban cards for our items.
As these cards often work by using different colors to signal a certain category or storage area, my questions are: how can we define the color in the item doctype and dynamically change the color in the print designer based on the value?

Using jinja.

<div style=“background-color:{{doc.custom_kanban_color}}”></div>

before adding the variable to the doctype I wanted to try it with a static statement

<div style="background-color:red"></div>

I tried adding this to the custom data section

but unfortunately it doesn’t work