History Graph Card Color Control

In the above image, I have a History Graph card that everytime I restart HA or reload something, the colors all change to random values depending on what states are availble in the given time. I would love to be able to say “stateA=blue”, “stateB=green”, etc and have it consistent.

If using the History Graph card is not the proper method, I am open to suggestions. I have tried ApexChart in the past, but that is so resource intensive on the client side that it just bogs everything down to a unresponsive state unless my client device has horsepower to it just for the ApexCharts to run.

For context, I have thermal probes on the supply and return ducts of my central air unit, and I am using the recorded values to calculate Delta-T of the system, and being able to correlate to what mode the central air was in (Heating, Cooling, Fan Only) and the given Delta-T helps me to understand if the system is performing well or if, in the case of Cooling and Delta-T is < 12, I need to clean out the condensor coil outside or change the filter.

What is the upper graph’s entity domain?
For some domains like “lock”, “binary_sensor” you can define state colors in a custom theme.

Just sensor

Then it is not possible by themes.
Use history explorer card.