Skip to main content
edited title
Link
underdark
  • 84.5k
  • 22
  • 233
  • 415

label based expression What's wrong with colour QGISmy expression to control label colors?

Source Link
dreab
  • 133
  • 1
  • 4

label based expression with colour QGIS

I am struggling to alter the label colours according to field values (as strings) in the attributes table.

In my mind what I want is:

If the string in column X = 'Proposed' Then label the point using the string in column Y, with color A

Else Label the point using the string in column Y, with color B End

I have tried a bit, but struggling with the syntax

case when  "ownerenc" = 'Proposed' 
then  (color_rgb(256,256,256))
else  color_rgb(56,56,0)   
end

But I realise this is quite wrong! Many thanks for your suggestions.