How to override hyperlink color in markdown card

using:

  - type: conditional
    conditions:
      - entity: binary_sensor.meteoalarm_brabant
        state: 'on'
    card:
      type: markdown
      style: |
        ha-card {
          background: #103773;
          color: white;
          }
      content: >
        {% set alarm_color = state_attr('binary_sensor.meteoalarm_brabant','awareness_level').split(' ')[1].split(';')[0] %}
        ## <font color= {{alarm_color}}> {{state_attr('binary_sensor.meteoalarm_brabant','headline')}}</font>

        <font color= {{alarm_color}}> **Severity:**</font> {{state_attr('binary_sensor.meteoalarm_brabant','severity')}}

        <font color= {{alarm_color}}> **Description:**</font>

        {{state_attr('binary_sensor.meteoalarm_brabant','description')}}

        <font color= {{alarm_color}}> [{{state_attr('binary_sensor.meteoalarm_brabant','attribution')}}]({{state_attr('binary_sensor.meteoalarm_brabant','web')}})</font>

results in:

which as you can see makes the link at the bottom hard to read. I would have hoped my {{alarm_color}} would set the color, but apparently that doesnt work on a hyperlink? Can this be done in another way?

thanks for having a look

if you are still having this issue (color of link text), I was finally able to fix this via this card_mod (I really wish the excellent markdown card would be modified to allow tap actions such as navigate)

not sure if this will work when you want multiple different font colors for links, but it worked in my single link case;

card_mod:
  style: |
    ha-card {
      --primary-color: #03a549 !important;
}

yes, primary-color is used for that element:

Scherm­afbeelding 2024-12-13 om 09.36.28

see the resource frontend/src/components/ha-markdown.ts at 655ce05efedd2e82359e9713dc2f5882c5b331d6 · home-assistant/frontend · GitHub

so, if you didnt set that in a theme, you can control it like you do

marking this solved now :wink:
sorry, should have done that before…
thanks for the reminder