mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Add NSCalibratedRGBColorSpace
support.
**Problems** Ghostty is using sRGB by default, optionally Display P3 color space. However neither color space matches to the color space that the regular macOS apps are using. That is `NSCalibratedRGBColorSpace`, seems called "Generic RGB" from initializer API name. Because of this, colors has same hex value are slightly darker on Ghostty compare to Terminal.app, for example. **Solution** Add `generic-rgb` to `WindowColorspace`, therefore users can set `window-colorspace` to `generic-rgb` in config to have similar colors with the other macOS apps.
This commit is contained in:
@ -322,6 +322,8 @@ class QuickTerminalController: BaseTerminalController {
|
||||
switch (self.derivedConfig.windowColorspace) {
|
||||
case "display-p3":
|
||||
window.colorSpace = .displayP3
|
||||
case "generic-rgb":
|
||||
window.colorSpace = .genericRGB
|
||||
case "srgb":
|
||||
fallthrough
|
||||
default:
|
||||
|
@ -301,6 +301,8 @@ class TerminalController: BaseTerminalController {
|
||||
switch (config.windowColorspace) {
|
||||
case "display-p3":
|
||||
window.colorSpace = .displayP3
|
||||
case "generic-rgb":
|
||||
window.colorSpace = .genericRGB
|
||||
case "srgb":
|
||||
fallthrough
|
||||
default:
|
||||
|
@ -5291,6 +5291,7 @@ pub const WindowTheme = enum {
|
||||
pub const WindowColorspace = enum {
|
||||
srgb,
|
||||
@"display-p3",
|
||||
@"generic-rgb",
|
||||
};
|
||||
|
||||
/// See macos-titlebar-style
|
||||
|
Reference in New Issue
Block a user