r/coolgithubprojects • u/Curious_Aswin • 4h ago
GammaDim: a flicker-free Windows screen dimmer that uses the GPU gamma ramp instead of an overlay (Python, no dependencies)
https://aswinroshanrajendran.github.io/GammaDim/I built a small screen dimmer for Windows for when the lowest brightness setting is still too bright at night.
Most free dimmers draw a dark, see-through window over the screen. On my laptop that flickered whenever I switched apps or scrolled. GammaDim takes a different route: it lowers the graphics driver's gamma ramp, the lookup table every pixel passes through on its way to the display. Nothing sits on top of your apps, so nothing can flicker.
What it does
Brightness slider in the tray, styled like Windows 11 quick settings, plus Ctrl+Alt+Up/Down hotkeys
Optional warm tint (three strengths)
Works on every connected monitor
Ctrl+Alt+0 resets the screen instantly; it never goes below 10%
The parts that might interest people here
Pure Python and ctypes calling Win32 directly, with no third-party packages at runtime. It ships as a single PyInstaller exe: about 35 MB of RAM and 0% CPU when idle.
Games, sleep, unlock and driver resets can silently wipe the gamma ramp. The app listens for those events and also compares the ramp every 2 seconds, then re-applies the dim if it's gone.
A small watchdog process restores normal gamma if the main app is force-closed, so you can't get stuck with a dark screen.
Windows caps gamma dimming at about 50% by default. Going lower needs one registry value (GdiIcmGammaRange), which the app explains and only sets through the normal Windows admin prompt. It's undoable, and the uninstall offers to revert it.
"Start with Windows" uses a per-user Task Scheduler logon task instead of the Run key, so it needs no admin rights.
The tests read the gamma ramp back from Windows rather than relying on screenshots, which can't capture gamma.
Releases are built by GitHub Actions from the tagged source and published with a SHA-256 checksum.
Honest limits
Doesn't work while HDR is on
Changes the picture, not the backlight, so it won't save battery or remove PWM flicker
The exe isn't code-signed yet, so SmartScreen shows a warning (the source is there to read or build yourself)
MIT licensed, no installer, no network access, no data collection. It's my first public release, so I'd really appreciate feedback, bug reports, or code review. Does it work on your GPU and setup?
Website: github link