Picture elements card label color

I can’t seem to get the color to change.

elements:
  - entity: sensor.battery_level
    style:
      left: 52.8%
      top: 67%
      color: > # different attempts:
        {% if states('sensor.battery_level') | int > 90 %} return rgb(0,255,0)  
        {% if states('sensor.battery_level') > 80 %} rgb(0,255,0)
        {% if states('sensor.battery_level') | int > 90 %} return 'rgb(0,255,0)'  
        # and what I believe is all combinations of them
    tap_action:
      action: toggle
    type: state-label
image: local/LGH crop.png
panel: true
type: picture-elements

Or is it impossible?

Edit.
This however works:

elements:
  - entity: sensor.battery_level
    style:
      left: 52.8%
      top: 67%
      color: rgb(0,255,0)  
    tap_action:
      action: toggle
    type: state-label
image: local/LGH crop.png
panel: true
type: picture-elements

To my knowledge Lovelace does not (yet?) accept templates…
I think I’ve seen a feature request on this in the past (not searched just yet)

Alright, that at least makes sense then.
Thank you!