f.lux, sunset Flickr/ozz13x and f.lux

I recently discovered an app that has completely revolutionized my nighttime computer usage. It's called f.lux, and frankly, you should've downloaded it yesterday.

F.lux is a free app for Mac, Windows, and Linux computers that makes the color of your display adapt to the time of day. It might help you catch some z's easier at night.

If you're anything like me, you spend the last half hour of the day curled in bed with a warm, humming computer in your lap. That 30-minute countdown to sleep is a chance for me to unwind with an article or a jaunt through my various social media channels. It soothes me.

Unfortunately, looking at your devices at night can actually make it harder to fall and stay asleep.

Screens produce blue light so we can see them even on sunny days. But at night, this brightness mimics the sun — sending mixed signals to the brain about what time is bedtime. The brain stops producing melatonin, a hormone that gives your body the "time to sleep" cues, and throws your circadian rhythm out of whack.

TI_Graphics_How blue light affects body (1)_2x1 Tech Insider's Kevin Loria and Skye Gould break down how poor sleep can lead to serious health risks. Skye Gould/Tech Insider

Not only does sleep suffer, but your risk goes up for ailments ranging from depression to cancer. Over time, not getting enough sleep can lead to a buildup of neurotoxins that make it even more challenging to doze off.

Knowing all this, there's still no way I'm giving up my screen time. It's my moment of zen.

So, at the recommendation of a friend, I downloaded f.lux, which automatically adjusts your screen's color-temperature depending on the time of day and your location. So when the sun sets on the west coast, any blue light emanating from my computer gradually changes to a reddish-orange hue.

f.lux side by side Melia Robinson/Tech Insider

To get started, I told f.lux my location and typical wake-up time. Based on these two metrics, the software figured out an approximate bedtime.

My first night after installing f.lux was very startling. Around 8 p.m., my screen began to dim and turned into a garish shade of apricot. As the night went on, reds deepened and blues continued to disappear. By the end of the hour, it was like I was wearing rose-colored glasses.

It took some getting used to. But within a week, I no longer noticed the change in color.

Occasionally I ran some digital errands, such as online shopping or editing photos, that required me to see true colors. I could disable f.lux for an hour or until sunrise in just two mouse-clicks. The convenient movie mode shut f.lux off for two and a half hours.