Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NSCalibratedRGBColorSpace support. #4202

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions macos/Sources/Features/Terminal/TerminalController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion src/config/Config.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,8 @@ keybind: Keybinds = .{},
@"window-theme": WindowTheme = .auto,

/// The colorspace to use for the terminal window. The default is `srgb` but
/// this can also be set to `display-p3` to use the Display P3 colorspace.
/// this can also be set to `display-p3` to use the Display P3 colorspace or
/// `generic-rgb` to use the Calibrated RGB colorspace.
///
/// Changing this value at runtime will only affect new windows.
///
Expand Down Expand Up @@ -5291,6 +5292,7 @@ pub const WindowTheme = enum {
pub const WindowColorspace = enum {
srgb,
@"display-p3",
@"generic-rgb",
};

/// See macos-titlebar-style
Expand Down