Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FLAVOR: Ubuntu Desktop

HEADLINE: Night mode by luminosity inversion

DESCRIPTION: Contrary to some other suggestions here, I am NOT talking about f.lux / redshift or similar blue light filters here. These are supposed to make you feel sleepy, but all I want is to remove blindingly bright lights in the middle of the night. Here is the pseudo-code for how it could work:

    Get some region on the screen (possibly the content of a window)
    convert all pixels in that region from RGB to HSL (not HSV/HSB)
    if average L value in the region > 0.5 {
        for all pixels {
            L = 1 - L
            re-render pixel
        }
    }
Similar color inversion modes that I know of:

  - a Kwin invert script, possibly assigned to meta+ctrl+i in KDE based distros

  - MS Windows color invert mode: win+"+", ctrl+alt+i
Note however that these are inferior as they change color composition since they invert RGB channels and dont do a HSL conversion


I don't know if it uses "luminosity inversion" thing you mentioned but I'm more than happy with xcalib(1). For extra comfort I apply redshift after inverting colors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: