Icon color based on state (Eta)

Hello, I want to change the color based on the eta to home. I want to get it so when the value ios less than 15 its green, less than 45 orange and more than 45 red. This is my code. How do I add that?

type: entities
title: ETA
  - entity: sensor.here_travel_time_duration_in_traffic
  - entity: sensor.here_travel_time_distance
  - entity: sensor.here_travel_time_duration_in_traffic_2
  - entity: sensor.here_travel_time_distance_2
  - entity: sensor.here_travel_time_duration_in_traffic_3
  - entity: sensor.here_travel_time_distance_3
  - entity: sensor.here_travel_time_duration_in_traffic_4
  - entity: sensor.here_travel_time_distance_4
state_color: true
  position: sidebar

You can not do that in the ordinary Lovelace card. But you have the “template-entity-row” card in HACS that can handle coloring depending on state. Perhaps that can help you.

Edit: You could also change in the theme as Glenn correctly states below

Review this thread, this should give you the info you need:

Defining a NUMERICAL sensor’s icon by a theme variable is not the best idea.