Solved

how to color a feature by attribute value

  • 20 March 2023
  • 2 replies
  • 27 views

Badge +8

I try to color features by attribute value. Tried both the FeatureColorSetter and the KML Styler.

 

I have the color in an attributes for each feature both as hex "#FFCC00" and as decimal "255,204,0" but both don't work when i feed them to "Fill Color" in the KMLStyler or FeatureColorSetter.

 

How do I have to format the color values?

icon

Best answer by ebygomm 20 March 2023, 15:25

View original

2 replies

Userlevel 1
Badge +21

The FeatureColor setter expects an FME color if setting via an attribute i.e. 1,0.8,0 (it will let you copy and paste hex and rgb colours via the interface but does the conversion for you and this doesn't work if you set via attribute)

There are custom transformers that will convert hex and rgb colours to fme colours, e.g. ColorCalculator

Badge +8

Thanks

Reply