During most of the evolution of our genus bright blue or green light meant it was daytime and hence time to be awake. But the red light from fires would often be present when our ancestors were sleeping. It isn't that you should avoid bright blue or green light in general, it's that you should avoid it for maybe an hour or so before you go to bed until when you want to wake up.
> But the red light from fires would often be present when our ancestors were sleeping.
I don't believe this is related. I believe it's simply that blue is the best/easiest/earliest color. The circadian rhythm is ancient, used by bacteria, plants, and mammals [1], long before humans had fire. Blue is most energetic, and is all that can be seen in the depths of the ocean, where life mostly likely originated.