Trying to OR multiple decimals to change button color

Hi,
I am trying to change a button color based on the decimal value from several tags.
If the value of any of the tags is 3, the result will be red,
If the value of any of the tags is not 3, the result will be yellow,
I want to use a statement of this structure because i will have 5 tags and 4 colors.
This is what I have at the moment:
if(({[default]P1DD9999} | {[default]P1DD9998}) = 3,
color (255,0,0),
color (255,255,0))

I think the problem is the OR operator?

Thanks

It's both the or (you are using bitwise or) and your syntax.

You need to compare each tag to 3 eg

if({t1} = 3 || {t2} = 3
  , red.... 
  , yellow... 
) 
2 Likes

Works brilliant.
Thank you so much!