Questions tagged [macos-darkmode]

Dark Mode is a feature introduced in macOS Yosemite that changes the primary color scheme of the operating system to one that features light text on dark backgrounds instead of the traditional dark text on light backgrounds. Use this tag for questions specifically related to detection and issues stemming from the use of Dark Mode on macOS as opposed to general light-on-dark color scheme questions.

First introduced in macOS Yosemite and further refined in macOS Mojave, Dark Mode enables uses to toggle the environment design of the operating system to a color scheme that features light text on dark backgrounds as opposed to dark text on light backgrounds.

Apple describes this as "a dramatic new look that's easy on your eyes and helps you focus on your work."

Modern software can detect the presence and use of Dark Mode to allow developers to display their software in a design that matches the aesthetics of other Dark Mode apps.

55 questions
317
votes
11 answers

How do I detect dark mode using JavaScript?

Windows and macOS now have dark mode. For CSS I can use: @media (prefers-dark-interface) { color: white; background: black } But I am using the Stripe Elements API, which puts colors in JavaScript For example: const stripeElementStyles = { …
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
119
votes
5 answers

How can I emulate prefers-color-scheme media query in Chrome?

Chrome 76 has added support for prefers-color-scheme media query (a.k.a. "dark mode"). But how can I test my webpage in both color schemes easily, without toggling the system dark mode on and off? Here is the same question for Firefox, but I can't…
xmcp
  • 3,347
  • 2
  • 23
  • 36
16
votes
4 answers

NSTextView draws black on almost-black in Dark Mode

When I build my macOS app in Dark Mode, some of my text views (NSTextView) render black text on a almost-black background. In Interface Builder, in the Attributes Inspector, the "Text Color" is set to to the system "Default (Text Color)", which I…
Jerry Krinock
  • 4,860
  • 33
  • 39
11
votes
2 answers

Python - Tkinter not support MacOS Mojave Dark Mode

I have a problem with the support of Dark Mode on MacOS in python Tkinter. I used python 3.6 with ActiveTlc 8.5 and the Dark Mode works fine, the window titlebar was dark, it's fine for me... but there were some problems with the
11
votes
2 answers

How to disable Dark Mode for my app in Mojave?

When I build my macOS app in Xcode 10 under Mojave, it automatically makes my app adopt Dark Mode. I am not ready yet to implement Dark Mode for my app. How do I disable Dark Mode for my app, so it appears aqua in both the light and dark mode under…
Eric
  • 1,858
  • 2
  • 16
  • 17
9
votes
3 answers

macOS Dark Mode and NSAboutPanelOptionCredits

I have a fairly straight forward App called Range in the app store that I want to make dark mode compliant for macOS 10.14. I've noticed is that the About window is not changing all of the text colors. I'm using the NSAboutPanelOptionCredits where…
Drew
  • 1,422
  • 1
  • 18
  • 29
8
votes
2 answers

Dark & Light Mode: How to switch manifest and favicon?

The manifest and the favicon are dependent on the light/darkmode is there any way of changing them as the user changes the mode in the operating system? Ive got the event listener firing window.matchMedia('(prefers-color-scheme:…
Bill
  • 4,614
  • 13
  • 77
  • 132
8
votes
3 answers

How to change the iOS Simulator "window background color" (Full Screen, Xcode 10, Mojave, Dark Mode)

Mojave (macOS 10.14) is great. Xcode 10.0 (10A254a) is great. Dark Mode is great. What is not so great, unless I'm missing something, is this ugly gray background of the iOS simulator window (when in full screen): Any idea on how to change that…
backslash-f
  • 7,923
  • 7
  • 52
  • 80
7
votes
1 answer

Xcode 11, Asset catalogue naming convention for dark / light images?

Previously images dragged into the Xcode asset catalogue could be named as follows ... Rabbit@2x.png Rabbit@3x.png on releasing the drag these images were automatically assigned to the correct 2x & 3x slots within the catalogue. Now with iOS 13…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
7
votes
1 answer

How to manually create dynamic (dark/light) NSImage instances?

It seems in macOS 10.14 Mojave, the only way to create NSImage instances that automatically draw a light and dark version is via asset catalogs and +[NSImage imageNamed:]. However, I need to create dynamic images at runtime and there doesn't seem to…
DarkDust
  • 90,870
  • 19
  • 190
  • 224
5
votes
1 answer

How do I create a template image-based and PDF-based icons for MacOS?

Summary I'd like to create a template image-based and/or PDF-based icon for a keyboard layout that would switch colors according to dark/light mode in MacOS Mojave when displayed in the menu bar. Background I've created a customized keyboard layout…
Orius
  • 1,093
  • 5
  • 11
4
votes
1 answer

How to detect the "Accessibility Reduce Transparency" In macOS (Objective-C)?

By default, macOS11.0 Big Sur set the "reduce transparency" to true on Accessibility. That makes the light status menu almost the same as the dark one, thus make the setting of my app's status menubar icon becomes a challenge. On iOS, a simple UIKit…
Jiulong Zhao
  • 1,313
  • 1
  • 15
  • 25
4
votes
2 answers

NSColor systemColor not changing when dark/light mode switched

I'm trying to change the colour of an image with the switching of dark/light mode in an NSViewController. I'm using this code for changing the colour of the image: - (NSImage *)image:(NSImage *)image withColour:(NSColor *)colour { NSImage…
Darren
  • 10,182
  • 20
  • 95
  • 162
4
votes
0 answers

macOS Mojave: Change app icon to match Dark/Light Mode

Is there a way to change my app icon dynamically when switching between Dark/Light Mode in macOS Mojave? I wish to change the icon appearance to appear appropriately in system alerts and notifications.
jigs
  • 839
  • 1
  • 6
  • 23
3
votes
2 answers

Fix the Erlang observer on OSX with dark-mode

For some reason the Erlang Observer does not work well with Mac OS dark mode. The background colour of the pane and the text is quite similar and so its hard to read at times. How do I get Observer to work with Mac OS dark mode?
StormKrow
  • 875
  • 1
  • 6
  • 10
1
2 3 4