Tonight the sun sets around 6:14 PM in your time zone

Let your screen set with the sun.

DuskMode warms your Mac at sunset, dims it past the lowest brightness key, and turns it gray before bed. Every step is timed from sleep research. You never touch a slider.

Free and open sourcemacOS 13+No account, no network0.0% CPU at idle
One evening, scroll to live it
Time6:14 PM
Colour6500 K
Dimming0%
GrayscaleOff
DuskModeFileEditWindow
Thu 6:14 PM
DuskMode Settings, Timeline tab, showing tonight's warmth and dimming curves
DuskMode Settings, Science tab, listing the studies behind each layer
Three layers, one picture

Warm first. Then dim. Then gray.

WarmthFrom sunset · 6500 K to 1900 K

Cuts blue near 464 nm, where melatonin suppression peaks, and trims green near 555 nm. Same display method as f.lux, so blacks stay black.

Strong evidence

DimmingFrom sunset, deepest at bedtime · up to 80%

Goes darker than your brightness keys can. Light level moves melatonin more than light colour, so this layer does the most.

Strong evidence

GrayscaleFrom 1.5 h before bed

Drains colour from feeds and thumbnails, so one more video is easier to skip. macOS shows its “Colour Filters” notice for a second each time grayscale switches. That's the system, and it can't be hidden.

Emerging evidence
Grayscalecolour filter · applied last
Dimmingdisplay gamma
Warmthdisplay gamma
Time6:14 PM
Colour6500 K
Dimming0%
GrayscaleOff

Grayscale has the last word. macOS applies it on top of everything else, so once it's on the screen is plain gray and the warm tint no longer shows. Dimming still does, which is why it matters most.

The details

Stays out of your way.

Grayscale

Need colour for a minute?

Press Option, Command, C. Full colour comes back for 60 seconds, then the evening eases back in on its own.

ScreenEvening
Colour2500 K

True colour for the apps that need it.

Figma, Photoshop and other colour-critical apps pause DuskMode on their own. Bring one to the front and your colours come back. For any other app, flip one switch. Dimming stays on, so switching never flashes bright.

In frontSafari
Colour2500 K
Dimming35%

Invisible on calls.

The filter is applied at the display, after anything captures the screen. Zoom, Meet and screenshots get normal colours while you keep the warm ones.

Tested with Apple's ScreenCaptureKit: a white pixel reads 255, 255, 255 with the filter on.

Your sunset, not a guess.

DuskMode works out sunset on your Mac with NOAA's solar equations, then builds tonight around it and your bedtime. Your location never leaves the Mac.

Sunset6:14 PM
Bedtime11:00 PM

This page estimates it from your time zone, the same fallback the app uses.

Private by design.

No account, no analytics, no update checks. Ask macOS which network connections DuskMode has open. It prints nothing, because there is nothing to print.

0
open network
connections
~ % 
The science

Built on 17 studies. Including the ones that disagree.

100%

of daytime melanopic light still reaching your eyes. Modelled from your display's red, green and blue output.

Light from your screenMelatonin sensitivity
Time6:14 PM
Colour6500 K
Dimming0%
GrayscaleOff

Brainard et al., 2001

Strong

Melatonin suppression peaks at 464 nm, across 72 people. Why the blue goes first.

Journal of Neuroscience ↗

Gooley et al., 2010

Moderate

Early in the evening, green light at 555 nm suppresses melatonin as much as blue. Why green is trimmed too.

Science Translational Medicine ↗

Brown et al., 2022

Strong

Expert consensus: under 10 lux in the evening, under 1 lux at sleep. This sets how deep dimming goes.

PLOS Biology ↗

Holte and Ferraro, 2020

Emerging

Students on grayscale phones used them about 40 minutes less a day. Gray screens aren't warm, so from here dimming does the melatonin work.

The Social Science Journal ↗

Disagrees: Cochrane review, 2023

Moderate

Blue-blocking glasses show no clear sleep benefit. They filter weakly and at any hour. DuskMode lowers the whole dose and times it.

Cochrane Library ↗
Compared

What Night Shift and f.lux leave out.

FeatureNight Shiftf.luxDuskMode
Warm colour on a scheduleYesYesYes
Timed from your bedtimeSunset or set hoursFrom wake timeYes
Dims past the lowest brightness keyNoNoUp to 80%
Grayscale before bed, automaticallyNoNoYes
Open sourceNoNoYes

Warm colour on a schedule.

All three do this. It's the baseline, and on its own it helps less than you'd think, because brightness matters more than colour.

Night Shift
f.lux
DuskMode
SunsetBedtime
Night ShiftYesf.luxYesDuskModeYes

Timed from your bedtime.

Move your bedtime and the whole evening moves with it. Every step is counted back from when you actually sleep, not from when the sun happens to set.

Bedtime11:00 PM
Night ShiftSunset or set hoursf.luxFrom wake timeDuskModeYes

Darker than your brightness keys go.

Your keys stop at a floor that is still bright for a dark room. DuskMode keeps going, up to 80% lower, because light level moves melatonin more than colour does.

Keys stop hereDuskMode
Dimming byBrightness keys
Night ShiftNof.luxNoDuskModeUp to 80%

Grayscale before bed, on its own.

At 9:30 PM colour drains from the screen by itself, so the feed loses its pull right when one more video is most tempting. macOS can do grayscale, but only when you remember to switch it on.

Time9:00 PM
Night ShiftNof.luxNoDuskModeYes

Open source. Read every line.

Native Swift with no third-party code. This is the real function that turns a colour temperature into what your screen shows, straight from the repository.

DuskModeCore/ColorTemperature.swift
public static func kelvin(forWarmth warmth: Double) -> Double {    let w = min(1, max(0, warmth))    return neutralKelvin - w * (neutralKelvin - minKelvin)} /// Per-channel multiplier (each 0…1; red is always 1) for a colour temperature.public static func multiplier(forKelvin kelvin: Double) -> (r: Double, g: Double, b: Double) {    let raw = blackbody(kelvin)    let ref = blackbody(neutralKelvin)    return (min(1, raw.r / ref.r),            min(1, raw.g / ref.g),            min(1, raw.b / ref.b))}
MIT licence50 self-testsRead the source ↗

Every row, in one free app.

Night Shift and f.lux warm your screen. DuskMode also times the evening from your bedtime, dims past your keys and grays the screen before bed. Free, and open source.

Night Shift1 / 5
f.lux2 / 5
DuskMode5 / 5
Install

One line in Terminal. That's it.

DuskMode isn't signed with a paid Apple certificate yet. Installing from Terminal skips the warning macOS shows for downloaded apps. You can read the script before you run it.

Terminal — zsh
~ % curl -fsSL https://raw.githubusercontent.com/neerajsingh869/DuskMode/main/install.sh | bash==> Downloading DuskMode==> Moving it to /Applications==> Opening DuskMode✓ DuskMode is in your menu bar. Sleep well.~ % 
Read install.sh

Prefer a normal download?

  1. Download DuskMode.dmg and drag the app to Applications.
  2. Open it. macOS says it could not verify the app is free of malware. That's because it isn't signed yet. Click Done.
  3. Open System Settings → Privacy & Security and click Open Anyway. You only do this once.
Download .dmg
macOS 13 Ventura or laterApple SiliconTo uninstall, quit it and move it to the Bin
10:52 PM · Red

Good night, screen.

Made by Neeraj Singh for his own evenings, then shared. Native Swift, no third-party code, 50 self-tests on the timeline maths. Every decision is written down in the repository.

DuskMode 1.0.3 · MIT licenceGitHubReport a problemResearch