How to change line colour in lovelace history graph

It’s a bit late, but it might be helpful to others, perhaps.
Here’s what works for me:

title: Verlauf
type: history-graph
hours_to_show: 168
entities:
  - entity: sensor.openweathermap_temperature
    name: Außentemperatur
  - entity: sensor.temperatur_luftfeuchtigkeit_01_2_og_balkonkraftwerk_temperature
    name: Box Temperatur
  - entity: sensor.solarbank_3_e2700_pro_temperatur
    name: Anker Temperatur
logarithmic_scale: false
card_mod:
  style: |
    ha-card {
      --graph-color-1: green;
      --graph-color-2: magenta;
      --graph-color-3: #53BDA5;          
      }