The VICE Channels

    The Story Behind f.lux, the Night Owl's Color-Shifting Sleep App of Choice

    Written by

    Matthew Braga

    Contributing Writer

    In 2005, Lorna Herf left her job at Google and took up painting. Her husband, Michael, turned a room in their loft into a studio, and installed colour-friendly lights. The bulbs simulated the conditions of daylight, so that Lorna's paintings would always look accurate as she painted late into the night.

    In the daylight room, their computer screens looked fine. But when she left the room, where the sun had long since set and the house bathed in the warm, low glow of evening light, she noticed the house’s other screens looked...weird. They all glowed with the same colour and intensity they did in the painting room, but out here, something was off. They didn’t fit the mood.

    Michael Herf was also a Google employee. The two had worked together on Picasa, the photo organization app that Google acquired, and which Michael co-founded and worked at as CTO. Given his photography background, he thought he might have a fix. Michael wrote a small script that altered the colours of their computer displays so that they would look more, for lack of a better word, natural in the evening light.

    The script removed blue light—the colour of daylight—leaving behind mostly red, which looked good at night. Michael and Lorna would later call their app f.lux.

    F.lux is, at first blush, a relatively simple program. In its current incarnation, the app synchronizes itself with the rising and setting of the sun (based on your current location), and as day turns to night, slowly adjusts the colours on your screen to be easier on your eyes (that’s the theory, anyhow).

    "Everyone thinks this problem is easy until they spend a year or two on it, and then they think it's the hardest problem they've ever worked on"

    A lot of people—particularly those that work late into the night—swear by this app, largely because of research that suggests exposure to light from screens before bed can affect your quality of sleep. You can frequently find it on best-of lists of popular utilities and must-have apps. Michael tells me that college students are one of f.lux’s core demographics.

    Initially, Lorna and Michael didn’t completely understand what it was their program did. They knew that making the colour adjustments made their displays easier to read and use later into the night, and that other people might appreciate this too.

    "We really thought six months after that, that we were done. We had done this app that was pretty baked. And we didn't really think it was that hard," Michael recalled. "Now we have this joke that, everyone thinks this problem is easy until they spend a year or two on it, and then they think it's the hardest problem they've ever worked on."

    Listen to the Radio Motherboard episode about sleep hacking your room. The podcast is available on iTunes and on your favorite podcast app.

    Developing f.lux, it turned out, was more complex than either Lorna or Michael initially thought. And in the seven years since they started working on the app full time, Michael and Lorna have realized what they’re really on is a mission to change the way that we sleep.

    The underlying principle behind f.lux is based on research into the effects of blue light on the body’s circadian rhythm. The gist is that, during the day, blue light from the sun inhibits the production of the sleep hormone melatonin. But after the sun sets, melatonin production ramps up, peaking at night, and tapering off again the next morning.

    In practice, however, our bodies are often exposed to blue light long after the sun sets, most notably, from our screens. A recent study from late 2015 showed that devices are only getting "bigger, brighter, [and] bluer"—and the effect is that blue light acts almost like a drug, disrupting the body's circadian rhythm and delaying the production of melatonin, and thus the onset of sleep.

    To compensate, f.lux attempts to gradually filter this blue light out of a computer's display as the night progresses—and in theory, prevent blue light from our displays from shifting the time time it takes to fall properly asleep by an hour or more. “Artificial-light exposure has been shown experimentally to produce alerting effects, suppress melatonin, and phase-shift the biological clock,” reads one study from 2014, and so f.lux operates on the belief that altering the wavelength and intensity of this light may have beneficial effects (its efficacy, however, has never been scientifically tested).

    "It took a little while for us to make that leap to sleep, and that [light] might affect sleep," Lorna said. She calls f.lux’s gradual reduction of brightness and blue light "a bit like a sunset" for electronic devices.

    "What we’re trying to do, and why we started with the colour temperature, is we’re trying to change that light in a way that makes sense to your brain and to your eyes," Lorna explained. "So by gradually changing the colour temperature, and shifting it, it feels a lot like dimming the lights."

    Michael and Lorna are quick to point out that that brightness also plays a role, as does distance from the source of light. The pair even operate a companion site called f.luxometer that measures the light intensity of various popular devices, and how this factors into your phase shift—the amount of time, say, a MacBook Air might shift your circadian timing if used before bed.

    "I think we've help create this idea [...] that blue light is bad. [But] we don't think that's true at all"

    But because f.lux, to many people, is merely the app that makes your screen look weird when the sun sets, Michael and Lorna feel that people may be misunderstanding how, exactly, f.lux is supposed to work.

    "People have started to really believe that, and I think it's partly our fault, that colours are sort of magical," Michael said—referring to the characteristic red, colour-warming shift that f.lux performs at night—"and that it doesn't matter how bright a light is, as long as it's the right colour."

    However, red isn't a magical colour. In fact, it's the absence of colour—blue, in particular—by which f.lux works. And even then, the intensity and closeness of the display matter too.

    Of course, just as red light isn't good, that's not to say blue light is bad, either.

    "Inadvertently, I think we've help create this idea, which I don't think we've said, but maybe we've helped create, that blue light is bad," Lorna added. "[But] we don't think that's true at all." It's just maybe not such a good idea to get so much of it at night.

    Meanwhile, f.lux has inspired a raft of competitors. RedShift is a popular open source alternative for Linux, Twilight is a popular option for Android phones, and Amazon introduced a feature called Blue Shade to its Fire tablets.

    But its biggest challenger could be the next version of Apple's mobile operating system, iOS 9.3. A recent beta of the software update introduced a feature called Night Shift. It "uses your iOS device’s clock and geolocation to determine when it’s sunset in your location. Then it automatically shifts the colors in your display to the warmer end of the spectrum, making it easier on your eyes," according to the company. It sounds suspiciously similar to f.lux (which was briefly available for the iPhone last year, albeit unofficially, through a process called sideloading; Apple’s requested the code’s removal from f.lux’s website, and it appears that this may be part of the reason why).

    If anything, these apps serve to validate f.lux’s initial theory—that there’s something to all of this bright, blue light that’s constantly bombarding our eyes well into the night, and we should probably be doing something about it.

    "Does that mean we all have to live in caves?” Lorna said. “No. But we do need to really understand what that threshold is.”

    You’ll Sleep When You’re Dead is Motherboard’s exploration of the future of sleep. Read more stories.