Giter Site home page Giter Site logo

nightlight's Introduction

Night Light

Build Status Donate

Get it on Google Play Get it on F-Droid

Night light uses KCAL to adjust blue light intensity of the display colors, so that viewing the screen at dark becomes pleasant for the eyes, and help you fall asleep faster (this is what science have proven so...).

What is KCAL?

KCAL is a display driver tuning feature for Qualcomm devices, written by savoca. Although this feature is most likely not shipped in the stock kernels of various custom ROMs, it should be available in the custom kernels available for your device, provided that your device runs on any 64-bit Qualcomm processor. To see the full list of supported qcom SoCs, visit this thread.

Why on earth did I make it?

I flashed a LineageOS oreo build on my device, but there was no night light feature available on the ROM. The build itself was early so there was no LiveDisplay, and the Android Oreo night light feature was not their as it is Pixel specific. Luckily, the kernel shipped with the build had KCAL, so I decided to harness this feature. But I had to everytime use a kernel manager app, and had to adjust the intensity, hence I decided to make an app that would make this easier for me.

Features

  • Easy to use user interface. Settings are easier to find.
  • Uses KCAL to adjust screen RGB colors, hence its efficient and changes are seen everywhere on screen.
  • Supports older KCAL implementations as well as newer KCAL implementation for v4.4 kernels.
  • Simple color controls for normal users through color temperature control.
  • Manual KCAL controls for advanced users.
  • Maximum and minimum color intensities. Use minimum intensity at evenings under lighted conditions, and maximum intensity at nights under pitch dark conditions.
  • Support for user profiles, which are collections of settings that user can apply with one click.
  • Automatic switching on/off night light at user specified timings.
  • Supports sunset/sunrise timings.
  • Additionally, dark hours start time is supported to make use of minimum and maximum intensities.
  • And to fulfill your all kinds of automation needs, app is supported as a Tasker plugin. You can use it with Profiles.
  • Set on boot delay.
  • Original KCAL settings of user is backed up and applied when night light is turned off. And it can be configured as well.
  • Quick Setting tile for easy toggling on/off night light anywhere.
  • Launcher icon shortcut for toggling Night Light on/off and toggling intensities.
  • Dark and Light theme.

Advantages

  • No overlays - As it uses KCAL to adjust screen colors.
  • No background service - Once again, as it uses KCAL to adjust KCAL screen colors, it does not need to keep a background service running. It simply makes changes by updating KCAL values, which, once changed, will persist until a reboot is made (unless the values are changed). For automation, alarms are used.
  • Battery friendly alarm implementation - Alarms implemented (for automation) does not necessarily trigger at the exact specified time as they are needed to. They are only triggered at a given time when the screen is on at that time. Otherwise, they are triggered as soon as the user turns on the screen after the given time.

Requirements

  • Kernel supporting KCAL.
  • Root access.

Permissions

  • Location - Needed to determine sunset/sunrise time for your current location.
  • Internet - Internet connection is needed to determine coarse location when fine location is not available.

nightlight's People

Contributors

corphish avatar acherepkov1989 avatar dom133 avatar thermatk avatar dennisxtria avatar karanrajpal14 avatar grarak avatar

Watchers

James Cloos avatar Tanish avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.