Could be mistaken but I think my Mac already does this -- it has "true tone" and when I open the lid, my main external monitor changes color temperature.
I wonder if there's a way to scrape that data and then send it to Home Assistant for light control.