108

On OSX, MacVim and Terminal can both be themed to be light-on-dark. Xcode 3.2 allow the same customization for its editor using color schemes.

However, is there a way to do the same to its UI panels ("Groups and Files" left pane and the list view top pane for example)? If not, is there a quick way to toggle both panels on/off?

1
  • 7
    looks like the conclusion is that there is no way to achieve this, right?
    – Joe Huang
    Sep 8, 2015 at 3:47

7 Answers 7

38

While you can't adjust the IDE color scheme, you can quickly toggle the navigator, debug area, and utility views with the following commands:

Navigator : ⌘0

Debug Area : ⇧⌘Y

Utility : ⌥⌘0

So, if you set your theme to one with a dark background, you can quickly close/open the lighter portions of the IDE as needed.

You can also change the debug console to have a different background by going into preferences ⌘., then go to Fonts & Colors, then select the Console. Now you can edit its background: enter image description here

Just be sure to edit the font colors of the various input and outputs texts if you choose black. By default all of the input/output fonts are black, only the console prompt is not.

2
  • 7
    I don't know who created these default shortcut combination, but its just way to hard for me to remember something that don't make any sense. Aug 28, 2015 at 12:04
  • @TypingPanda you can modify the shortcut combinations in Preferences/Key Bindings.
    – slothbear
    Jul 24, 2016 at 14:05
29

One possibility for now: System Preferences => Accessibility => Display => Invert Colors.

Note that Apple recently announced at WWDC that Xcode 10 will support "dark mode" as of some time in late 2018.

1
  • 7
    Thanks for the reply. I am aware of the option, but it is system-wide as I understand. Everything looks now like photo negative (drop shadows now look like halo glow, kinda amusing actually), also I will have to get a different editor theme that takes the reverse video into account. Furthermore, I have to fix up the other dark-themed apps I already use (Terminal, xterm, etc), and I don't have a solution for things like web browser content. So unless the reverse-video can be made app-specific, the solution is likely not going to be feasible.
    – pokkimon
    Apr 29, 2010 at 2:49
9

One cool workaround for this is to use a combination of

  1. "Invert Colors" (in System Preferences -> Accessibility -> Display -> Invert Colors OR setting up a "Ctrl-Opt-Cmd-8" shortcut in System Preferences -> Keyboard -> Shortcuts -> Accessibility -> Invert Colors) and
  2. Choosing your favourite dark theme in Xcode's "Fonts & Colors", but inverted (!).

For example, I like a Choco theme from Chocolat app, but I need the functionality of Xcode, so I imported the theme manually by adjusting and enhancing some of the fonts and colors in some Xcode's custom dark theme's duplicate. After I was happy with the final theme, I duplicated it and inverted the colors using one of the websites that can be found in Google (http://www.mattlag.com/scripting/hexcolorinverter.php). And voila! "Ctrl-Opt-Cmd-8" + "Inverted Dark Theme" makes the whole Xcode environment dark and looking great, without the need of hiding any other sections of Xcode like Navigator, Debug and Utilities.

Let me know if this solution helps. I find it a little time consuming, but worth the effort.

p.s.: I've posted the discussed themes on GitHub: https://github.com/Rep0se/xcode-themes

p.p.s: To theme FileMerge tool in Mojave (for now) use this solution in combination with Invert Colors outlined above.

Quick shortcut Tip: To launch preferences, hit "Command" + ","

enter image description here

7
  • 1
    Can you please share this theme files?
    – Procurares
    Jan 22, 2018 at 10:16
  • @Procurares I've updated the post with the link to themes mentioned, I also posted Readme on how to install them.
    – Repose
    Jan 22, 2018 at 20:35
  • 1
    @Dale if you are used to a specific dark colour scheme like I am. Simply inverting the colours doesn’t do it for me. Notice chocolate theme enabled when the colours are inverted on my screenshot.
    – Repose
    Apr 26, 2018 at 23:02
  • 1
    Actually, with combination of my answer, this would really do :D Just create script to invert colors for the assets and we are done :D Jul 2, 2018 at 8:38
  • 1
    @Repose I believe the DVTTheme will stay the same... Haven't tried beta yet, but I believe the Aqua will be given Dark theme (Default Aqua x Dark Aqua) and this would not affect the theme... Just the color of components, which can be modified... Jul 2, 2018 at 10:48
7

WWDC 2018 announced that Xcode 10 on macOS 10.14 will finally include native dark mode support. This will be available around Q3 2018. It will be a full dark style from the side menus to storyboards.

5

You can turn to full dark mode with the new macOS Mojave. Simply go to System settings->General and switch to dark. Enjoy!!!

2

I've been digging around lately and I found some kind of "Hack" of DVT Framework myself... Xcode 10 with dark theme is however around the corner, so there will be no need for this hacking anymore... Anyway you can do nice thingies with this such as changing Highlight colors for buttons and plist-file browsers... If you open Xcode with Show Package Contents and browse a bit, you can find this nice file:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/Resources/Default.dvttheme

You can open this either with Visual Studio Code or Atom or any code editor.

From now on, you can do some hacking and change some of the colors in the Xcode IDE:

For example editing the default white to transparent

But somehow, due to nature of Aqua theme/user interface, you cannot change the scrollViews, which is a bit disappointing... When you could, I would already create repo which would have all the craziness of colors for this. If you want, you can change at least plistViewer and the Attributes inspector windows (The properties are called and documented nice in Default.dvttheme

Hope this helps a bit.

edit:

What you could do is to edit the default Aqua theme with ThemeEngine https://github.com/DominikBucher12/ThemeEngine

(Change assets to black/dark) and the Xcode would inherit this Appearance..

-5

There is an Xcode project that has a huge collection of themes, both light and dark. My favorite is Moodnight. https://github.com/hdoria/xcode-themes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.