macos: default to sRGB color space

This commit is contained in:
Karol Bakunowski
2023-09-01 18:08:39 +01:00
committed by Mitchell Hashimoto
parent 4ae1f821d2
commit d7072cd29e

View File

@ -23,7 +23,12 @@ class PrimaryWindow: NSWindow {
backing: .buffered, backing: .buffered,
defer: false) defer: false)
window.center() 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( window.contentView = NSHostingView(rootView: PrimaryView(
ghostty: ghostty, ghostty: ghostty,
appDelegate: appDelegate, appDelegate: appDelegate,