This question already has an answer here:
I would like to keep in black a part of my label (title) and make the other one varying according to a value.
In this (simplified) example, as required, the value color is varying according to a concentration, but also the title.
I would like to keep the first line in black and make the second one varying.
'Drill ' || "id" || '\n' || CASE WHEN "Conc" >100 THEN "Polutant" || ': ' || "Conc" else '' END
if ("Conc"> 220, color_rgb( 255,0,0) , color_rgb( 0,0,0))
Can QGis handle such a situation and how, or have I to program a function? In this last case, do you have an example to put me on the right way?