Change color of field in a grid

I can change the color of field in a row a follows

sc_field_style({product}, ‘#FFFFCC’, ‘15px’, ‘#000000’, ‘Arial, sans-serif’, ‘bold’);

Anyone know of a way to substitute #FFFFCC with a variable, so I can vary the color based on different conditions
I am sure it can be done but I cant get the syntax

Lewis