Make your macOS app themable

Check how to effortless add theming support to your macOS application with the new ThemeKit framework.

Paw making use of ThemeKit

Dark Theme for Everyone!

Light / Dark Theme

Theme-aware Assets

  • Light Theme: ThemeColor.brandColor = NSColor.blue
  • Dark Theme: ThemeColor.brandColor = NSColor.white

Bundled Themes

  • LightTheme: (default) macOS light appearance
  • DarkTheme: macOS dark appearance
  • SystemTheme: automatically alternates between LightTheme and DarkTheme, reacting to user setting in “System Preferences > General > Appearance”

Creating New Themes

  • a light theme, natively written in Swift 3 (could have been done in Objective-C as well)
  • a dark theme, defined on a plain text file (a .theme file).
Live editing of `.theme` files

Putting it all together

Our Sample App

Going further…

ThemeKit Demo.app

Useful links & material

--

--

Fun, positive and open-minded. Love to laugh! Co-founded @interactolabs, former Paw @luckymarmot contributor — http://nunogrilo.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nuno Grilo

Fun, positive and open-minded. Love to laugh! Co-founded @interactolabs, former Paw @luckymarmot contributor — http://nunogrilo.com