Ready and ePrescription are the elements and Labels. Here the Label and background color are changed conditionally. Hope this may help.
If @IsNew and D1 = "" then
{
Attribute (Ready, ATTR_ID_Label, "Prepare")
RGBColor (Ready, 255, 255, 0, 255, 0, 0)
Attribute (ePrescription, ATTR_ID_Label, "ePrescription")
RGBColor (ePrescription, 127, 0, 0, 255, 255, 0)
}
Else if @Mode ( ) = 0 and D1 <> "" and Cond1 <> "" then
{
Attribute (Ready, ATTR_ID_Label, "DONE")
RGBColor (Ready, 255, 255,255, 0, 255, 0)
}