├── .gitignore ├── LICENSE ├── Package.swift ├── Preview.png ├── README.md ├── Sources └── XcodeTheme │ └── main.swift └── SundellsColors.xccolortheme /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | /.swiftpm 7 | Package.resolved 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 John Sundell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.1 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "XcodeTheme", 7 | dependencies: [ 8 | .package(url: "https://github.com/JohnSundell/Files.git", from: "4.0.0"), 9 | .package(url: "https://github.com/JohnSundell/ShellOut.git", from: "2.0.0") 10 | ], 11 | targets: [ 12 | .target(name: "XcodeTheme", dependencies: ["Files", "ShellOut"]) 13 | ] 14 | ) 15 | -------------------------------------------------------------------------------- /Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnSundell/XcodeTheme/09fca5040bbfdc90bf9b7f5794c9ccae0d6409f6/Preview.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🎨 My Xcode theme - Sundell's Colors 2 | 3 | This repository contains the Xcode theme that I use. Feel free to use it or modify it to your liking 👍 4 | 5 | ![](Preview.png) 6 | 7 | ## Installing using Swift Package Manager 8 | 9 | The easiest way to install this Xcode theme is to clone this repo and execute `swift run`: 10 | 11 | ``` 12 | $ git clone https://github.com/JohnSundell/XcodeTheme.git 13 | $ cd XcodeTheme 14 | $ swift run 15 | ``` 16 | 17 | This will install [Adobe's Source Code Pro](https://github.com/adobe-fonts/source-code-pro) font and this Xcode theme for you. Afterward, you can remove the downloaded folder: 18 | 19 | ``` 20 | $ cd .. 21 | $ rm -rf XcodeTheme 22 | ``` 23 | 24 | ## Installing manually 25 | 26 | You can also choose to do things manually if you want: 27 | 28 | 1. Clone this repo: 29 | ``` 30 | $ git clone https://github.com/johnsundell/xcodetheme.git 31 | ``` 32 | 33 | 2. Create a folder at this path if it doesn't exist already: 34 | ``` 35 | ~/Library/Developer/Xcode/UserData/FontAndColorThemes 36 | ``` 37 | 38 | 3. Copy the file `SundellsColors.xccolortheme` into the above folder. 39 | 40 | 4. Download the latest release of Source Code Pro from [its repo](https://github.com/adobe-fonts/source-code-pro). 41 | 42 | 5. Unzip the font archive and move the files in the `TTF` folder to `~/Library/Fonts`. 43 | 44 | 6. Should've used the install script, right? 😉 45 | 46 | ## Attributions 47 | 48 | This Xcode theme is the result of years of tweaks and modifications to some version of a "Solarized" theme. I have no idea where I got the 49 | original material for this theme from, but if you recognize some aspect of this theme as coming from something you made, feel free to open 50 | an issue and I'll gladly add attributions to you 🙂 51 | -------------------------------------------------------------------------------- /Sources/XcodeTheme/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Files 3 | import ShellOut 4 | 5 | let fontsFolder = try Folder.home.subfolder(at: "Library/Fonts") 6 | 7 | if !fontsFolder.containsFile(named: "SourceCodePro-Regular.ttf") { 8 | print("🅰️ Downloading Source Code Pro font...") 9 | 10 | let fontZipURL = URL(string: "https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip")! 11 | let fontZipData = try Data(contentsOf: fontZipURL) 12 | 13 | print("🅰️ Installing Source Code Pro font...") 14 | 15 | let fontZipFile = try fontsFolder.createFile(named: "SourceCodePro.zip", contents: fontZipData) 16 | try shellOut(to: "unzip \(fontZipFile.name) -d SourceCodePro", at: fontsFolder.path) 17 | 18 | let sourceCodeProFolder = try fontsFolder.subfolder(named: "SourceCodePro") 19 | let ttfFolder = try sourceCodeProFolder.subfolders.first!.subfolder(named: "TTF") 20 | try ttfFolder.files.move(to: fontsFolder) 21 | 22 | try sourceCodeProFolder.delete() 23 | try fontZipFile.delete() 24 | } 25 | 26 | print("🎨 Installing Xcode theme...") 27 | 28 | let themeURL = URL(fileURLWithPath: #file.replacingOccurrences(of: "Sources/XcodeTheme/main.swift", with: "SundellsColors.xccolortheme")) 29 | let themeData = try Data(contentsOf: themeURL) 30 | 31 | let xcodeFolder = try Folder.home.subfolder(at: "Library/Developer/Xcode") 32 | let userDataFolder = try xcodeFolder.createSubfolderIfNeeded(withName: "UserData") 33 | let themeFolder = try userDataFolder.createSubfolderIfNeeded(withName: "FontAndColorThemes") 34 | 35 | let themeFile = try themeFolder.createFile(named: "SundellsColors.xccolortheme") 36 | try themeFile.write(themeData) 37 | 38 | print("") 39 | print("🎉 Sundell's Colors successfully installed") 40 | print("👍 Select it in Xcode's preferences to start using it (you may have to restart Xcode first)") 41 | -------------------------------------------------------------------------------- /SundellsColors.xccolortheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DVTConsoleDebuggerInputTextColor 6 | 0.437649 0.509511 0.517715 1 7 | DVTConsoleDebuggerInputTextFont 8 | SFMono-Regular - 11.0 9 | DVTConsoleDebuggerOutputTextColor 10 | 0.437649 0.509511 0.517715 1 11 | DVTConsoleDebuggerOutputTextFont 12 | SFMono-Regular - 11.0 13 | DVTConsoleDebuggerPromptTextColor 14 | 0.317071 0.437736 1 1 15 | DVTConsoleDebuggerPromptTextFont 16 | SFMono-Bold - 11.0 17 | DVTConsoleExectuableInputTextColor 18 | 0.437649 0.509511 0.517715 1 19 | DVTConsoleExectuableInputTextFont 20 | SFMono-Regular - 11.0 21 | DVTConsoleExectuableOutputTextColor 22 | 0.437649 0.509511 0.517715 1 23 | DVTConsoleExectuableOutputTextFont 24 | SFMono-Regular - 11.0 25 | DVTConsoleTextBackgroundColor 26 | 0.0980392 0.0980392 0.0980392 1 27 | DVTConsoleTextInsertionPointColor 28 | 0.905714 0.905714 0.905714 1 29 | DVTConsoleTextSelectionColor 30 | 0.32076 0.406575 0.440224 0.45 31 | DVTDebuggerInstructionPointerColor 32 | 0.653506 0.472476 0 1 33 | DVTMarkupTextBackgroundColor 34 | 0.170196 0.170196 0.170196 1 35 | DVTMarkupTextBorderColor 36 | 0.23658 0.23658 0.23658 1 37 | DVTMarkupTextCodeFont 38 | SFMono-Regular - 12.0 39 | DVTMarkupTextEmphasisColor 40 | 0.580743 0.672002 0.672002 1 41 | DVTMarkupTextEmphasisFont 42 | .AppleSystemUIFontItalic - 12.0 43 | DVTMarkupTextInlineCodeColor 44 | 0.580743 0.672002 0.672002 0.7 45 | DVTMarkupTextLinkColor 46 | 0.32076 0.406575 0.440224 1 47 | DVTMarkupTextLinkFont 48 | .AppleSystemUIFont - 12.0 49 | DVTMarkupTextNormalColor 50 | 0.580743 0.672002 0.672002 1 51 | DVTMarkupTextNormalFont 52 | .AppleSystemUIFont - 12.0 53 | DVTMarkupTextOtherHeadingColor 54 | 0.580743 0.672002 0.672002 0.5 55 | DVTMarkupTextOtherHeadingFont 56 | .AppleSystemUIFont - 16.8 57 | DVTMarkupTextPrimaryHeadingColor 58 | 0.580743 0.672002 0.672002 1 59 | DVTMarkupTextPrimaryHeadingFont 60 | .AppleSystemUIFont - 28.8 61 | DVTMarkupTextSecondaryHeadingColor 62 | 0.580743 0.672002 0.672002 1 63 | DVTMarkupTextSecondaryHeadingFont 64 | .AppleSystemUIFont - 21.6 65 | DVTMarkupTextStrongColor 66 | 0.580743 0.672002 0.672002 1 67 | DVTMarkupTextStrongFont 68 | .AppleSystemUIFontBold - 12.0 69 | DVTSourceTextBackground 70 | 0.0980392 0.0980392 0.0980392 1 71 | DVTSourceTextBlockDimBackgroundColor 72 | 0.5 0.5 0.5 1 73 | DVTSourceTextCurrentLineHighlightColor 74 | 0.153719 0.175173 0.183585 0.8625 75 | DVTSourceTextInsertionPointColor 76 | 0.905714 0.905714 0.905714 1 77 | DVTSourceTextInvisiblesColor 78 | 0.653506 0.472476 0 1 79 | DVTSourceTextSelectionColor 80 | 0.32076 0.406575 0.440224 0.45 81 | DVTSourceTextSyntaxColors 82 | 83 | xcode.syntax.attribute 84 | 0.653506 0.472476 0 1 85 | xcode.syntax.character 86 | 0.845024 0.363792 0.257662 1 87 | xcode.syntax.comment 88 | 0.273199 0.356152 0.384519 1 89 | xcode.syntax.comment.doc 90 | 0.273199 0.356152 0.384519 1 91 | xcode.syntax.comment.doc.keyword 92 | 0.437649 0.509511 0.517715 1 93 | xcode.syntax.identifier.class 94 | 0.34798 0.341704 0.727421 1 95 | xcode.syntax.identifier.class.system 96 | 0.34798 0.341704 0.727421 1 97 | xcode.syntax.identifier.constant 98 | 0.445678 0.546771 0 1 99 | xcode.syntax.identifier.constant.system 100 | 0.445678 0.546771 0 1 101 | xcode.syntax.identifier.function 102 | 0.100271 0.454959 0.792659 1 103 | xcode.syntax.identifier.function.system 104 | 0.100271 0.454959 0.792659 1 105 | xcode.syntax.identifier.macro 106 | 0.653506 0.472476 0 1 107 | xcode.syntax.identifier.macro.system 108 | 0.653506 0.472476 0 1 109 | xcode.syntax.identifier.type 110 | 0.34798 0.341704 0.727421 1 111 | xcode.syntax.identifier.type.system 112 | 0.34798 0.341704 0.727421 1 113 | xcode.syntax.identifier.variable 114 | 0.109221 0.571582 0.526692 1 115 | xcode.syntax.identifier.variable.system 116 | 0.109221 0.571582 0.526692 1 117 | xcode.syntax.keyword 118 | 0.793626 0.0956333 0.435336 1 119 | xcode.syntax.number 120 | 0.845024 0.363792 0.257662 1 121 | xcode.syntax.plain 122 | 0.580743 0.672002 0.672002 1 123 | xcode.syntax.preprocessor 124 | 0.653506 0.472476 0 1 125 | xcode.syntax.string 126 | 0.75595 0.215588 0.0291611 1 127 | xcode.syntax.url 128 | 0.32076 0.406575 0.440224 1 129 | 130 | DVTSourceTextSyntaxFonts 131 | 132 | xcode.syntax.attribute 133 | SourceCodePro-Regular - 20.0 134 | xcode.syntax.character 135 | SourceCodePro-Regular - 20.0 136 | xcode.syntax.comment 137 | SourceCodePro-Regular - 20.0 138 | xcode.syntax.comment.doc 139 | SourceCodePro-Regular - 20.0 140 | xcode.syntax.comment.doc.keyword 141 | SourceCodePro-Regular - 20.0 142 | xcode.syntax.identifier.class 143 | SourceCodePro-Regular - 20.0 144 | xcode.syntax.identifier.class.system 145 | SourceCodePro-Regular - 20.0 146 | xcode.syntax.identifier.constant 147 | SourceCodePro-Regular - 20.0 148 | xcode.syntax.identifier.constant.system 149 | SourceCodePro-Regular - 20.0 150 | xcode.syntax.identifier.function 151 | SourceCodePro-Regular - 20.0 152 | xcode.syntax.identifier.function.system 153 | SourceCodePro-Regular - 20.0 154 | xcode.syntax.identifier.macro 155 | SourceCodePro-Regular - 20.0 156 | xcode.syntax.identifier.macro.system 157 | SourceCodePro-Regular - 20.0 158 | xcode.syntax.identifier.type 159 | SourceCodePro-Regular - 20.0 160 | xcode.syntax.identifier.type.system 161 | SourceCodePro-Regular - 20.0 162 | xcode.syntax.identifier.variable 163 | SourceCodePro-Regular - 20.0 164 | xcode.syntax.identifier.variable.system 165 | SourceCodePro-Regular - 20.0 166 | xcode.syntax.keyword 167 | SourceCodePro-Regular - 20.0 168 | xcode.syntax.number 169 | SourceCodePro-Regular - 20.0 170 | xcode.syntax.plain 171 | SourceCodePro-Regular - 20.0 172 | xcode.syntax.preprocessor 173 | SourceCodePro-Regular - 20.0 174 | xcode.syntax.string 175 | SourceCodePro-Regular - 20.0 176 | xcode.syntax.url 177 | SourceCodePro-Regular - 20.0 178 | 179 | 180 | 181 | --------------------------------------------------------------------------------