Wednesday, November 4, 2026

Safari 27.3: Adaptive Dark Mode

Simon Fraser et al. (Hacker News):

When enabled by a user, Safari adapts light websites and presents them as dark.

[…]

At the core of Adaptive Dark Mode is the transformation of color. Sometimes colors are simply decorative, while other times they have semantic meaning. Adaptive Dark Mode determines when to invert colors so elements remain visible or when to leave colors unchanged.

While creating Adaptive Dark Mode, we developed a color matrix to invert the luminosity of colors while preserving hue. It’s used to make light backgrounds dark, and dark text light. When transforming text color, Adaptive Dark Mode aims for sufficient contrast as defined by the WCAG 4.5:1 contrast ratio. Light CSS gradients are also transformed to dark.

[…]

It takes the same care with images. Most are left unchanged, preserving their integrity. But many icons and logos can lose contrast when the background color behind them is inverted. So Adaptive Dark Mode inspects SVG images and transforms colors when needed. For bitmap images, it analyzes the pixel histograms and inverts simple black-and-white logos.

See also: NSTextView.usesAdaptiveColorMappingForDarkAppearance (WWDC 2019).

Federico Viticci:

If this sounds familiar, it’s because so many third-party Safari extensions for this very task already exist, including the very popular (and a MacStories favorite) Noir.

Previously:

3 Comments RSS · Twitter · Mastodon


They should use this in mail, instead of showing bright white mails over dark background.


This is cool but it seems like something else devs are going to have to test for. Unless it’s somehow more reliable than anything Apple’s ever done


@Michael I'm surprised you haven't posted anything yet about Apple's recent "Switch to Safari" ad campaign which is certainly... interesting: https://www.macrumors.com/2026/10/13/apple-switch-to-safari-vs-chrome/

It's even got an official page on Apple's website! https://www.apple.com/safari/switch/

I'd be more supportive of this if Apple would actually port Safari to Windows again, or even make new ports to Android and Linux! As is, however, it sort of feels kinda desperate. Chrome is mentioned so many times on that page, which doesn't look bad until one compares it to their other currently-running campaigns like Mac does that. (Switch to Mac) where Windows is only mentioned a couple times (PC gets twice that amount), or even Switch to iPhone where Android is only mentioned once! (And I clicked on everything to double-check!)

I really would like Chrome's stranglehold to get broken up (especially after Manifest v3 and how they tried to smother JPEG XL), but until Apple gets serious about bringing Safari to other platforms (outside of their WebKit engine which hardly anyone outside the Apple ecosystem wants to use instead of Google's Chromium fork, which furthers my point), they'll still be stuck playing on defense against Google Chrome for the foreseeable future.

Leave a Comment