The short version
Every score is a forecast of colour, not just of whether you'll see the sun. We take the hourly weather forecast for the half hour either side of sunset and ask four questions: is there a canvas of mid or high cloud to catch the light? Is the western horizon open, so the light can reach that canvas, even from under a solid deck? Is there low cloud, rain or fog in the way? Is the air clean, or carrying just enough haze to deepen the reds? The answers multiply into a number from 0 to 100, with a soft top so that only near-perfect setups reach the high 80s and 90s.
The data
- Weather: the Open-Meteo forecast API, hourly: cloud cover (total, low, mid and high), relative humidity at 2 m, visibility, precipitation probability and amount, plus daily sunrise and sunset. Open-Meteo blends national weather models (ECMWF, DWD ICON, NOAA GFS and others) and picks the best one for each location.
- Air: the Open-Meteo air-quality API (CAMS): aerosol optical depth at 550 nm and dust.
- Past evenings: the same forecast API with
past_days, and the historical forecast API for older dates. This means a past score is what the forecast said at the time, not a measurement. - Toward the sunset: the same weather data at points 60, 150 and 250 km along today's sunset azimuth. The 60 and 150 km points tell us whether low cloud blocks the horizon. All three tell us whether there is a clear path under a cloud deck: sunlight that lights a deck 4–8 km up skims in from roughly 150–300 km away.
- Sun position: computed in your browser with the standard solar-position equations (the same approach as NOAA's solar calculator), accurate to about a minute.
The colour window
The colourful part of a sunset runs from roughly 10 minutes before sunset to 30 minutes after, because high clouds stay sunlit long after the sun has gone below your horizon (NOAA's Corfidi explains why). We sample the forecast at −30, 0, +15 and +30 minutes around sunset, interpolating between hourly values, and average them.
The factors
| Factor | What we measure | Effect |
|---|---|---|
| Canvas | max(mid, high) + 0.35 × min(mid, high) | 0.34 with a clear sky, rising to 1.0 between 42% and 68%, falling to 0.34 when the sky is completely covered |
| Clear gap under a deck | low + mid cloud (the larger) at 60/150/250 km, weighted 1:2:2 | When the canvas is 75% or more and low cloud overhead is under 40%, the canvas is lifted to as much as 0.8: full lift with a path ≤15% blocked, fading out by 60%. This is the classic "fire sky", where a solid deck is lit from underneath, and it's worth about 70–85 in practice. It doesn't stack with the post-rain bonus. |
| Low cloud overhead | low cloud % | ×1.0 up to 20%, ×0.72 at 50%, ×0.42 at 75%, ×0.15 at 100% |
| Western horizon | low cloud 60 and 150 km toward the sunset azimuth (or total cover ≥97% there) | ×1.0 up to 25%, ×0.8 at 50%, ×0.5 at 75%, ×0.3 at 95% |
| Rain | precipitation probability and amount | ×1.0 up to 30%, ×0.75 at 60%, ×0.42 at 90%; another ×0.6 if more than 0.3 mm falls |
| Humidity | relative humidity | ×1.0 up to 65%, ×0.9 at 85%, ×0.74 at 100% (moist air mutes colour) |
| Visibility | metres | ×0.35 in fog (<800 m), ×0.85 at 10 km, ×1.0 from 20 km |
| Aerosols | aerosol optical depth (AOD) | ×1.05 for light haze (0.06–0.3) because it deepens reds; ×0.92 at 0.5, ×0.75 at 0.9 because heavy haze washes colour out |
| Post-rain clearing | ≥0.5 mm in the 2–9 h before sunset, then dry with an open horizon | +0.08 bonus: clean air and broken cloud behind a front |
raw = canvas × low × horizon × rain × humidity × visibility × aerosol + clearing, where canvas = max(cover canvas, gap lift). Above 0.7 the curve saturates: soft = 0.7 + 0.29 × tanh((raw − 0.7) / 0.35), so a raw of 0.85 gives 82, 1.0 gives 90, and 1.04 gives 92. Score = round(100 × clamp(soft, 0.03, 0.99)). A score of 85+ needs a near-perfect evening.
Lisbon, a clear-air evening: high cloud 45%, mid 10%, low 5%, horizon low cloud 10%, rain chance 5%, humidity 60%, visibility 24 km, AOD 0.12. The canvas is 45 + 0.35 × 10 = 48.5%, which is in the sweet spot, so 1.0. Every multiplier is 1.0 and aerosols add ×1.05, so raw = 1.05, and the soft top turns that into 92, "Pink & fiery". Swap the high cloud for a 70% low stratus deck overhead, with the horizon still open, and the low-cloud factor drops to about 0.48, while the canvas falls to 0.34 (no upper cloud). Then 0.34 × 0.48 × 1.05 ≈ 0.17 → 17, "Grey & flat".
85% mid cloud and 20% high overhead, 10% low, humidity 70%, AOD 0.15. Toward the sunset there is 10% low cloud and 5% mid cloud at the 60, 150 and 250 km points. On cover alone the canvas is 85 + 0.35 × 20 = 92% → 0.49, which would score 51. But the path under the deck is open, so the gap lift raises the canvas to 0.8: raw = 0.8 × 0.975 × 1.05 ≈ 0.82 → 80, "Vivid glow". If the deck carries on toward the sun (mid cloud 60% or more out there), the lift goes away and the score falls back to around 50.
Why these factors
The physics is well established. Low sun light crosses far more atmosphere, so blue is scattered out and reds remain (Met Office). Mid and high clouds, as classified in the WMO International Cloud Atlas, stay lit after sunset and reflect that light back down. Low cloud sits in shadow and blocks it, and the light has to arrive from the sunset direction. That is the core of every serious sunset model, including the published Skyfire approach of comparing cloud overhead with cloud toward the sun (US patent 10,459,119). Light aerosol deepens reds while heavy haze dims everything; NASA Earth Observatory has a good primer on aerosols.
Limits, honestly
- Weather models place clouds to within roughly 20–30 km, and small cumulus are hard to forecast at all. A "patchy horizon" evening can surprise you either way.
- Days 1–2 are the most reliable. Days 3–7 show a trend.
- Cloud cover percentages don't describe texture. 40% cirrus streaks and 40% blobby altocumulus look different, and both can be beautiful.
- The clear-gap bonus was added on 5 December 2026. A deck's edge is placed to within a few tens of kilometres, so on a solid-lid evening a high score means "go and look west", not a guarantee.
- Local terrain such as mountains to your west or a coastline facing the wrong way isn't modelled. Pick a viewpoint with an open view toward the sunset.
How we test it
Every photo in the gallery is stored next to the score we predicted for that place and evening. That gives us a growing set of "predicted vs actual" pairs, which we use to tune the curves above. When we change the model we'll note it here.
5 December 2026: clear-gap bonus, 250 km point and soft top. We backtested old against new on 30 cities over the past 60 evenings (1,810 evenings). The share of evenings scoring 85+ fell from 7.9% to 6.6%, the share scoring 70+ rose from 13.1% to 16.0%, and the mean moved from 35.0 to 36.1. 6.5% of evenings rose by 10 or more points, almost all of them a deck overhead with a clear gap toward the sunset.