Incorrect UI Element Colors for existing application binaries in 10.14 Dark Mode

Number:rdar://41206326 Date Originated:June 18 2018
Status:Open Resolved:
Product:AppKit Product Version:macOS 10.14 Beta (18A293u)
Classification:Bug Reproducible:Always

NSColor returns incorrect color objects for applications built with the 10.13 (or earlier) SDK, when called early during application initialization. Specifically, the call is made before NSApplicationMain is called.

The effect of this is that applications that have not been rebuilt with the 10.14 SDK look bad on macOS with a mix of light and dark colors, and the there may also be text contrast usability issues.

This happens at least for [NSColor windowBackgroundColor], and maybe for other colors.

Steps to Reproduce:
Make sure macOS is configured for dark mode. Log[NSColor windowBackgroundColor] components first thing in main().

Expected Results:
[NSColor windowBackgroundColor] returns a light Aqua background color with components of 0.925490.

Actual Results:
[NSColor windowBackgroundColor] returns a dark mode background color with components of 0.196078.

macOS 10.14 Beta (18A293u)

Appearance: Dark


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!