From d7072cd29e0191ce0985764e1e3c5d0f22a9147f Mon Sep 17 00:00:00 2001 From: Karol Bakunowski Date: Fri, 1 Sep 2023 18:08:39 +0100 Subject: [PATCH] macos: default to sRGB color space --- macos/Sources/Features/Primary Window/PrimaryWindow.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Features/Primary Window/PrimaryWindow.swift b/macos/Sources/Features/Primary Window/PrimaryWindow.swift index 6f6e0ba73..b959e494b 100644 --- a/macos/Sources/Features/Primary Window/PrimaryWindow.swift +++ b/macos/Sources/Features/Primary Window/PrimaryWindow.swift @@ -23,7 +23,12 @@ class PrimaryWindow: NSWindow { backing: .buffered, defer: false) window.center() - + + // Terminals typically operate in sRGB color space and macOS defaults + // to "native" which is typically P3. There is a lot more resources + // covered in thie GitHub issue: https://github.com/mitchellh/ghostty/pull/376 + window.colorSpace = NSColorSpace.sRGB + window.contentView = NSHostingView(rootView: PrimaryView( ghostty: ghostty, appDelegate: appDelegate,