Skip to main content
Solved

how to color a feature by attribute value


hermann
Contributor
Forum|alt.badge.img+10

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?

Best answer by ebygomm

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

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • March 20, 2023

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


hermann
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • March 24, 2023

Thanks


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings