editor

Slatewave for Xcode

A full Xcode color theme — source editor, console, and markup — tuned for Swift.

Latest release
0.0.1 · last month
Last commit
3 weeks ago
//
//  PaletteController.swift
//  Slatewave Theme Browser
//
//  Created by Kevin Langley on 05/03/2026.
//  Copyright © 2026 Slatewave. All rights reserved.
//

import SwiftUI
import OSLog

let SLATEWAVE_PREVIEW_WIDTH: CGFloat = 440
let SLATEWAVE_PREVIEW_HEIGHT: CGFloat = 485

final class PaletteController: NSViewController, ObservableObject {
    @Published var data: PaletteIdentifiableData?

    override func loadView() {
        // hand the view off to a SwiftUI host
        let rootView = PaletteRootView()
            .frame(width: SLATEWAVE_PREVIEW_WIDTH, height: SLATEWAVE_PREVIEW_HEIGHT)
            .environmentObject(self)

        let hostedView = NSHostingView(rootView: rootView)
        view = hostedView
    }

    /// Cancels the current preview session.
    /// Closes the preview UI without applying anything from the user.
    func cancel() {
        previewContext.cancelRequest(
            withError: NSError(domain: PreviewErrorDomain, code: PreviewError.userCanceled.rawValue))
    }

    func cancelWithFailed() {
        Logger.preview.error("cancelling preview context as failed")
        previewContext.cancelRequest(
            withError: NSError(domain: PreviewErrorDomain, code: PreviewError.failed.rawValue))
    }

    func cancelWithUserInteractionRequired() {
        Logger.preview.info("user interaction is required")
        previewContext.cancelRequest(
            withError: NSError(domain: PreviewErrorDomain, code: PreviewError.userInteractionRequired.rawValue))
    }
}
Line: 35 · Col: 1

About this theme

An .xccolortheme covering the source editor, debugger console, and Markdown markup rendering. Syntax mapping matches the rest of the family — strings teal, keywords sky, types teal-200, macros purple — and the debugger console uses the same palette as the editor for a consistent feel.

Slatewave for Xcode covers every surface Xcode lets a theme touch — the source editor, the debugger console (input, output, prompts), and Markdown markup rendering inside .md files and DocC comments. The selection, current-line highlight, and cursor all use teal-300, the Slatewave signature accent.

Syntax mapping leans into Swift’s grammar: strings are teal, keywords sky-400, types and classes teal-200, macros and DocC keywords (- Parameter, - Returns) purple, and attributes (@MainActor, @Published) amber-italic. Numbers, characters, and constants share the rose accent so a literal stands out from the surrounding code.

Color values in the .xccolortheme plist are space-separated R G B A floats in the 0.0 – 1.0 range — easy to tweak by hand or by duplicating the theme inside Xcode’s Themes pane.

Install

Don't have the CLI yet? Install the Slatewave CLI →

  • Slatewave CLI

    Install with the Slatewave family CLI — one command, every theme.

    slatewave install xcode
  • Manual

    Clone the repo and drop the `.xccolortheme` into Xcode's user themes directory.

    1. git clone https://github.com/kevinlangleyjr/xcode-slatewave.git
    2. mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes
    3. cp xcode-slatewave/Slatewave.xccolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes/
    4. Restart Xcode, then Settings → Themes → Slatewave