Skip to content

Kumux is the world's first dynamic circadian color scheme for code editors and other software.

License

Notifications You must be signed in to change notification settings

Kumux/kumux-colorscheme-engine

Repository files navigation

kumux-colorscheme-engine

Install for Visual Studio Code

Kumux is the world's first dynamic circadian color scheme for code editors and other software.

Why we created the Kumux color scheme

As software developers, we spend most of our waking hours in front of the computer.

You might be aware that artificial light, and light emitted by computer and smartphone screens can harm our sleep quality. Reduced exposure to natual light and extended exposure to artificial light, (especially at night) has been associated with stress, reduced productivity, eye strain and sleep disruption.

Eye strain and loss of productivity can also be caused by inadequate contrast levels or inadequate visibility on your monitor, especially if you are working in sunlight.

How does the Kumux color scheme solve those problems?

The Kumux color scheme dynamically controls your color scheme throughout the day, based on accurate calculations of of sunlight. It minimizes disruption using smooth, automatic transitions.

It controls the amount of light (especially blue light) emitted by your monitor in order avoid sleep disruption. Blue light is boosted around solar noon in order to improve your productivity.

The contrast levels change during the day based on the amount and color of daylight available. This helps ensure adequate visibility throughout the day while also preparing you to wind down by the end of the day.

Kumux color scheme always adapts your colors and contrast dynamically based on the current position of the sun in your geo-location.

Features

  • Optimized for you circadian rhythm
  • Smooth transitions
  • Natural feeling color scheme throughout the day
  • Integrate Kumux color scheme in your application using our library
  • A single configuration file for all apps on your computer

Features coming soon

  • Control your Philips HUE lightbulbs
  • Customize contrast levels
  • Learns from your favorite color schemes
  • Support for light color schemes
  • Monotone and grayscale filters
  • Automatically control your monitor backlight
  • Customize settings based on different environments (office, home, balcony, etc...)
  • Adapt to your work schedule and person sleep patterns

Applications supported by the Kumux color scheme

Comparison with other solutions

f.lux, Redshift etc.

Software that change the color temperature of your screen during the day are convenient, however their effect is limited, as they can only make minor adaptations to color temperatures without distoring the image on your screen so much.

In comparison with such software, the Kumux color scheme has almost full control over the colors and the contrast in your editor (and other applications) without having to cause any distortions to other content on your screen, such as images and websites.

The Kumux color scheme may be used independently from f.lux and other software, or in combination with them.

Static color schemes

A single colorscheme can reduce negative impact in the afternoon and evening but it is is not able to provide optimal circadian impact throughout the day. The optimal contrast levels are also different throughout the day.

Manually switching between color schemes

Manually switching between color schemes may get the job done, but it may create sharp transitions during the day, and requires you to remember to manually change color schemes during the day.

Plugins that change color schemes during the day

There are some editor plugins that change your color schemes during the day. Some examples are circadian.el or Sundial.

These plugins allow you to change the color scheme during the day, however introduce sharp changes instead of smooth transitions.

Some of them also require you to set up timers manually. Kumux color scheme always adapts your colors and contrast dynamically based on the current position of the sun in your geo-location.

Using Kumux color scheme in your application

Install

Using npm:

npm i @kumux/colorscheme-engine

Using yarn:

yarn add @kumux/colorscheme-engine

Retrieving theme data

Import the getColorschemeSnapshot function:

import getColorschemeSnapshot from '@kumux/colorscheme-engine'

Afterwards, call this function to retrieve your theme based on one of the templates.

Here's how you'd generate a vscode theme:

const colorScheme = await getColorschemeSnapshot("vscode", {})

Keep in mind that the theme is only updated once you call this function again. In order to get smooth transitions, call this function every couple seconds and update the theme variables in your application.

List of available templates

To see what templates are available (other than "vscode"), look at this folder https://github.com/Kumux/kumux-colorscheme-engine/tree/main/templates

Get configuration location

import { getConfigPath } from '@kumux/colorscheme-engine/dist/config'

console.log(getConfigPath())

How effective is Kumux color scheme?

Using the Kumux color scheme it is possible to reach the recommended values for a healthy light exposure.

Calibrated measurements have been taken in different scenarios and it has been found that it is possible to provide the state of the art scientific values as described in the paper "Recommendations for healthy daytime, evening, and night-time indoor light exposure" [1]

This color scheme is under continuous development and new configurations are being explored to obtain optimized results.

[1] B. T. et al., “Recommendations for Healthy Daytime, Evening, and Night-Time Indoor Light Exposure,” 2020, doi: 10.20944/PREPRINTS202012.0037.V1. https://www.researchgate.net/publication/347626355_Recommendations_for_Healthy_Daytime_Evening_and_Night-Time_Indoor_Light_Exposure