Vary light color and intensity depending on time of day examples?

I have 5 coloured lights that are triggered by movement at night.
At the moment they just turn on with the last set state info for colour and brightness.

I am thinking of creating a virtual sensor that contains JSON values for brightness and colour that varies depending on the time.

Something like:
6PM -->10 PM x brightness and x colour
10PM --> 5AM x brightness and x colour

Then using this virtual sensor when turning on all my lights.

The idea is that when the lights turn on before bedtime they are quite bright and during the night dim etc.

Has anyone already done something similar? I don’t want to reinvent the wheel :slight_smile: