srcery-terminal icon indicating copy to clipboard operation
srcery-terminal copied to clipboard

Colors look different between Terminal.app and Alacritty.

Open xfbs opened this issue 5 years ago • 9 comments

So, I've setup both Terminal.app and Alacritty with the srcery colorscheme. And I noticed that the colors don't look identical. I took some screenshots to show this:

Terminal.app with Srcery colorscheme: terminal

Alacritty with Srcery colorscheme: alacritty

I wasn't exactly sure why this would be. I checked the settings and confirmed that both are set correctly. For example, for the red color, Terminal.app is set to #EF2F27, and Alacritty is set to 0xEF2F27. So that should be identical. But it's not. I had a hunch that it has something to do with color correction, so I used the Apple Digital Colour Meter to check.

Terminal.app renders Generic RGB 239, 47, 39. alacritty_color

Alacritty renders 239, 47, 39 as Display Native Value. terminal_color

This is why they look different, I'm guessing that Alacritty doesn't perform color correction. I'm not sure if that is a bug or a feature. But maybe the configs have to be adjusted slightly? I might manually perform color correction and pop the correct values into Alacritty so it's more consistent. Just leaving this here in case anyone else notices.

xfbs avatar May 21 '19 15:05 xfbs

Is there anything I can do with either Alacritty or Terminal.app conf? This seems to be an OS issue if what you describe is happening. Seems none of the colors when using Apple Digital Colour Meter are correct. If I check the Alacritty conf the color hexes are correct according to the srcery palette. I don't know exactly whats going on with the terminal.app config, it was generated using terminal.sexy using the same palette, but if you confirmed the hex values are correct it seems to be an issue with color correction

roosta avatar May 22 '19 09:05 roosta

They are both correct, in a way: #EF2F27 = rgb(239, 47, 39), and they both show 239, 47, 39 as color values. But one of them is interpreting that as a gRGB, and the other as a native RGB. I guess this is a bug with Alacritty (or Terminal.app?).

xfbs avatar May 22 '19 18:05 xfbs

Can this be of relevance https://github.com/jwilm/alacritty/issues/1485?

MindTooth avatar May 22 '19 18:05 MindTooth

In Terminal.app, there's a gear icon in the color picker to select color profile. The built-in Terminal "themes" are set to "Device RGB", Srcery colors are set to "Generic RGB". Maybe changing the profile here will make the colors consistent?

srcerycolors

mtklr avatar May 26 '19 14:05 mtklr

Oh wow.. I didn't even notice that thing. That seems like a good remedy!

xfbs avatar May 27 '19 16:05 xfbs

Since this seems to be resolved, I'm closing this issue.

roosta avatar May 28 '19 16:05 roosta

I think this issue is not really solved. Since the Terminal.app profile uses the 'Generic RGB' colorspace, the colors will be off when moving to sRGB/Device RGB. The only solution is to generate a profile that uses the sRGB colorspace, but unfortunately it's overly complicated because of how Apple stores the profile configuration in a file.

I think that adding a note in REAMDE mentioning this would be useful.

I have a "patched" Terminal.app profile here: https://github.com/Sangeppato/srcery-terminal-app

Sangeppato avatar Nov 15 '19 08:11 Sangeppato

Is your solution generic enough that we might upstream it? How will it effect others?

MindTooth avatar Apr 26 '20 10:04 MindTooth

@MindTooth If you're referring to this repo, unfortunately the profile is manually generated following the palette. I didn't find any resource about creating a profile for Terminal.app using sRGB colours.

lulor avatar Apr 26 '20 12:04 lulor