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
entities:
  - 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
view_layout:
  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:
https://community.home-assistant.io/t/2022-12-color-states-are-broken-unusable/499890

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