Color to RGB in card-mod CSS

I’m only a few months into using HA, but was hoping for some advice from the community. I have a hue light (flood.light) that I am trying to read the rgb_color attribute and style the text color in a mod-card using CSS. I know that the CSS will accept color in the format “color: rgb(255,0,0)”, but I’m not sure how to dynamically read the rgb_color from the light and properly format the CSS.

type: picture-elements
elements:
  - type: state-label
    entity: sensor.weather
    style:
      top: 6%
      left: 70%
      font-size: 150%
      color: 'rgb({{ states.flood.light.attributes.rgb_color }})'