You have to insert in dynamic class.
Let me show you, first i create classs
then im going to the page that i want to adjust in my case it is test page
when you double click on example text, you will have ‘edit text’ window, then go to appearance and dynamic classes:
and voila
You can use the dynamic class for this, create two css classes beforehand so that you can change the colour of the background. For example:
.red-background { background-color: red; }
.green-background { background-color: green; }
if
$currentObject/YOUROBJECT = ‘yourvalue’
then
'green-background'
else if $currentObject/YOUROBJECT = ‘yourvalue2’
then
'red-background'
else
’’