2

I want to have a different color for my label when zooming out.

I've prepared an expression, which is not valid

 CASE 
 if(@map_scale>1750, (color rgb 128,128,128))
 else
 "auxiliary_storage_labeling_color"
 end   

There is a good example here:

Setting different colors based on value when labeling using QGIS

but applies to the certain data attribute table feature. How to write a scale-based expression? What have I done wrong in my case?

1 Answer 1

5

The correct syntax for your expression is:

if(@map_scale>1750,color_rgb(128,128,128),"auxiliary_storage_labeling_color")

or

Case
When @map_scale>1750 Then color_rgb(128,128,128)
Else "auxiliary_storage_labeling_color"
End

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.