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
3
votes
1 answer

Mimic JavaFX's ColorAdjust brightness using pure Java

I'm attempting to convert a color image to a useable monochrome image, but without the "jagged" edges. From a similar question asking to convert an image from color to black and white, one of the accepted answers provides a simple trick from…
tresf
  • 7,103
  • 6
  • 40
  • 101
3
votes
0 answers

Mojave Html Mail Dark Mode: Prevent certain elements from being altered

Mail in Mac OS Mojave alters the colors of html emails, (it appears in cases when no images are present 1 and dark mode is enabled) This is all fine, except when an email also contains a logo as svg image. Mail now takes the svg image and "inverts"…
st-h
  • 2,444
  • 6
  • 37
  • 60
3
votes
1 answer

Is there a way to toggle Dark Mode on/off for individual apps in MacOs Mojave?

Is there a way in Terminal to toggle Dark Mode On/Off for an individual app without affecting the rest of the environment? I use calendar on my Mac, and the appearance is dreadful. The rest of the apps look great in Dark Mode. I want to disable…
David M
  • 133
  • 1
  • 5
2
votes
0 answers

HTML problems with apple mail on darkmode

I'm having such a weird problem with a html of a mail marketing newsletter when receiving the email on apple mail (osx and ios- both latest) on dark mode. I add the media queries and everything works perfect from light to dark, images changes…
kyllaz
  • 59
  • 1
  • 5
2
votes
1 answer

NSAppearance is not updating when toggling dark mode

I have a macOS app that runs only in the macOS status bar. I changed the "Application is agent (UIElement)" property in the Info.plist to "YES": LSUIElement I have a timer that prints out the appearance's name every 5 seconds…
Lukas Würzburger
  • 6,543
  • 7
  • 41
  • 75
2
votes
2 answers

Provide Dark Mode icons for Qt on macOS

My application written with Qt 5.13 uses a QToolBar. To place icons on it, I have this line in my source: const QIcon openIcon = QIcon::fromTheme("document-open", QIcon(":/images/open.png")); This works well and the application appearance changes…
z80crew
  • 1,150
  • 1
  • 11
  • 20
2
votes
2 answers

How to get dynamic NSMenu to use Mojave Dark Mode?

My OS is set to dark mode, and my whole app renders properly, except for some dynamically created NSMenu instances, which render in the old light style. How do I get those menus to render using a dark visual style?
CuriousGeorge
  • 7,120
  • 6
  • 42
  • 74
2
votes
1 answer

Will Office 365 Add-Ins support Dark Mode on Mac

We're building an Office 365 Add-In for Outlook. Now that Outlook introduced Dark mode on Mac we wonder if there is / will be support for switching the colors/icons when outlook is running in Dark mode. So far I wasn't able to find any information…
2
votes
2 answers

Buttons and Labels text Not visible in Dark Mode of OSx Mojave.Any delegate Method for identifying the Mode Switching?

My application have some UI issues in Mac Os Mojave.Some labels and buttons text content are not visible when I switched to Dark Mode.So I did one workaroud using following code. var interfaceStyle =…
2
votes
2 answers

Dark Mode: NSColor.colorNamed doesn't return the right color in certain methods

colorNamed generally works for me, however, I am trying to call it inside NSTableViewRow.drawSeparatorInRect:, and it always return the color in the light appearance, even if the system is in Dark Mode. - (void)drawSeparatorInRect:(NSRect)dirtyRect…
Eric
  • 1,858
  • 2
  • 16
  • 17
2
votes
1 answer

How to use dark mode in CSS with MacOS Mojave?

MacOS Mojave has been recently released with the Dark Mode option. Is there a way to use it in web apps, with CSS?
Paul Miller
  • 1,960
  • 1
  • 13
  • 15
2
votes
0 answers

How to influence background color when I use NSView.dataWithPDF(inside:)

I cannot translate the DarkAqua appearance into a PDF right now. The resulting document uses a white background color. But that removes visibility of white elements in the view (which I use as part of dark mode). I was able to influence JPG…
Wizard of Kneup
  • 1,863
  • 1
  • 18
  • 35
1
vote
1 answer

Is it possible to use JavaScript to switch between light mode and darkmode on a page?

I can use @media (prefers-color-scheme: dark) or window.matchMedia('(prefers-color-scheme: dark)').matches to detect whether it's a dark mode the OS. However, is there any way that I can modify the status on my own with JavaScript? So that I can…
AGamePlayer
  • 7,404
  • 19
  • 62
  • 119
1
vote
3 answers

Updating programmatically set colors on Mode change (dark mode, light mode) on macOS (objective-c)

i am on macOS, objective-c, not iOS. XCode 12. In a lot of views i set colors like this: self.menuIconBar.wantsLayer = YES; self.menuIconBar.layer.backgroundColor = [NSColor colorNamed:@"color_gradient_right"].CGColor; Whenever the user changes the…
Pat_Morita
  • 3,355
  • 3
  • 25
  • 36
1
vote
1 answer

Electron NativeTheme: Cannot set property 'themeSource' of undefined

currently I am trying to setup a system/light/dark mode switcher in my electron app. For the electron app, I have used the electron-vue library and upgraded then the electron version to 7.3.2. So now I thought, I can use the new API nativeTheme from…
Julian Schmuckli
  • 3,681
  • 11
  • 37
  • 64