Dashbord changing icon color with attribute

Hello folks,

I’m trying to set the color of an icon of a chip from an attribute containing directly the color in hexa decimal.

The entity in question and its attributes:

The Yaml of the chip , that doesn’t work :

type: entity
entity: sensor.qualite_globale_lyon
display_type: complete
name: Index Qualité Air Lyon
state_content:
  - Libellé
color: |-
  return '{{sensor.qualite_globale_lyon.attributes.Couleur}}'

Thank you.