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

Colorspace Options #4686

Closed
typkrft opened this issue Feb 11, 2022 · 9 comments
Closed

Colorspace Options #4686

typkrft opened this issue Feb 11, 2022 · 9 comments

Comments

@typkrft
Copy link

typkrft commented Feb 11, 2022

Is your feature request related to a problem? Please describe.
I saw this issue and suspect this to be related. In my experience colors look a bit washed out or faded when compared to Wezterm and VSCode. Maybe it's possible I missed a configuration option somewhere. When using Digital Color Meter.app Kitty and iTerm2 differ, but it is imperceptible to me. Wezterm and VSCode match exactly. The swatches on Dracula's website seem to be somewhere in between kitty and others, but subjectively closer to Wezterm or VSCode.

Describe the solution you'd like
If this is expected, and this relates to the other thread than an option would be ideal. Though considering none of the colors match up perfectly I'm not sure there is an perfect solution, what I'd like to see is getting as close to the reported values on dracula's website. Though syncing up with Wezterm and VSCode would be in improvement in my eyes, obviously very subjective.

Describe alternatives you've considered
Color shifting the entire theme for kitty seems excessive, though if there's an easy way to do this, that would be acceptable. I am not particularly familiar with how colors work or are displayed.

Additional context
I'm not sure if some kind of compression is occurring on github, but the differences are significantly more subtly than they are in the actual screenshots I took.

Kitty on the left, Wezterm on the right
Colors
Wezterm on the Bottom, Kitty on the top The Reds seem to be the most off.
colors2

@kovidgoyal
Copy link
Owner

It is expected and as I said on #2249 as far as I can tell, the color rendering is the correct expected color rendering on macOS. Matching the rendering of Wezterm or VSCode or XYZ is not a goal for kitty. Matching the color rendering of the OS is, and it does that already as far as can be determined. Adjusting colors to make X look more like Y will just mean that somebody else complains that A looks less like B. Not a gme I wish to be playing, sorry.

@typkrft
Copy link
Author

typkrft commented Feb 11, 2022

Yeah no worries, it is was subjective, but I thought I'd ask. You mentioned a one line patch on the other thread, is this what you were referring to?

@kovidgoyal
Copy link
Owner

You just revert the srgb patch referenced in the issue, which was a one line patch.

@typkrft
Copy link
Author

typkrft commented Feb 11, 2022

A note just in case anyone stumbles across this.

Setting the below line in glfw/cocoa_window.m From

    [window->ns.object setColorSpace:[NSColorSpace sRGBColorSpace]];

to

    [window->ns.object setColorSpace:[NSColorSpace displayP3ColorSpace]];

or simply removing the line all together as mentioned above and in the other thread referenced above and building results in colors matching Wezterm identically and subjectively, but significantly more vibrant colors. It appears that P3 is the default color space that macOS defaults to for at least built in displays.

A few references :

Apple's target P3 colorspace can cover fewer teals and greens (light shaded area). However, P3 is stronger in yellow-green, yellow, orange, red, and magenta (dark shaded area). If instead we compare P3 to the standard sRGB colorspace, the differences are even more significant

@jrmoulton
Copy link

A note just in case anyone stumbles across this.

Setting the below line in glfw/cocoa_window.m From

    [window->ns.object setColorSpace:[NSColorSpace sRGBColorSpace]];

to

    [window->ns.object setColorSpace:[NSColorSpace displayP3ColorSpace]];

Ahhh this finally fixed it! Thanks!

@ciscohack
Copy link

Does anyone knows how to use the macos_colorspace option added in the nightly build

is this config correct

macos_colorspace 'srgb'
or
macos_colorspace srgb

@slve
Copy link

slve commented May 26, 2022

Hi @ciscohack it's macos_colorspace srgb
see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.macos_colorspace

@ciscohack
Copy link

Hi @ciscohack it's macos_colorspace srgb see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.macos_colorspace

Thanks !

@kovidgoyal
Copy link
Owner

kovidgoyal commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants