How to change lights color temperature based on brightness?

Hi,

I’m trying to map the color temperature of my lights based on brightness. For example, I want them to be 3200k when they are bright and 2200K when they are dim. I’ve searched on these forums but have only found “adaptive lighting” that changes based on the time of day, which I’m not looking for.

I think this would likely happen via an automation, where the trigger is light brightness (though I haven’t figured out how to make this happen for all lights, rather than needing to specify a particular entity), but I haven’t gotten it to work yet. Any advice or guidance would be apprecaited!