-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Colors not recreated perfectly due to color space #349
Comments
It could be something with the translation scripts since they all use different formats. The conversions are done from the iterm version (which doesn't have hex values per se) to xrdb then a lot of the converters use though. It could be slight differences in formats etc. The question is, does the xfce version you're referencing resemble the iterm version when each is in it's respective terminal? |
It's close, but independent color-picker Independent color-picker I think we can conclude therefore that there is a problem somewhere in the pipeline. Not a major one though, the colors are quite similar, but still. |
Interesting. Unfortunately, unless someone more knowledgeable than I is able to troubleshoot the conversion scripts, there's not a whole lot I can do. The conversion scripts are all user-provided by others and not my own product. And most are in Python I believe, which I don't speak well enough |
Oh, no, I was too quick to jump to conclusions. Your scripts are faithfully recreating the iterm2 specifications, it's that iterm2 doesn't do the same. For example, the iterm2 specification for And it specifies colors that don't exist in the actual palette. For example: <key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
<key>Red Component</key>
<real>0.73333334922790527</real>
</dict> This implies an Perhaps it has something to do with color spaces, I'm not sure, |
@gnachman Sorry to ping, but could you shed any light on the above? 😄 |
If I understand correctly the problem is that when you use the I don't know how https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/xfce4terminal/colorschemes/Builtin%20Dark.theme gets turned into an iTerm2-compatible file, but if it exactly matches the color presets at https://gitlab.com/gnachman/iterm2/-/blob/master/plists/ColorPresets.plist#L2993-3202 then it should work correctly. But I have a feeling I've misunderstood the actual problem, perhaps because of my unfamiliarity with xfce and other tooling involved here. |
Thank for helping out @gnachman 😄
I think you did 😄 The current question is described here: #349 (comment) Basically, how does iterm2 convert <key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
<key>Red Component</key>
<real>0.73333334922790527</real>
</dict> to a color. The naive approach is obviously to just multiply those values by 255. But simply by clicking through the colors of |
It doesn't. Other way around. One or two of the converters convert originally from the .itermcolors file, then the rest base off of one of those converted files (xrdb I believe but would have to check) |
Because no colorspace is given, that is interpreted in the "calibrated" rgb colorspace, which is device-specific. At the AppKit level, colors are in 0…1, not 0…255, so that is the native representation at the app level. Internally, macOS will apply gamma correction and give it to the GPU in whatever format it uses (so 0…255 is irrelevant, as it's either going to be floating point or 16 bit or whatever). In iTerm2 version 3.4.x and earlier, the UI shows colors in the sRGB color space. These values will always be a little different than the calibrated colorspace, and sRGB may have a larger gamut. In iTerm2 version 3.5.0 betas, the color space is indicated in the color picker and will use P3 when available. I would advise you never to leave the colorspace unspecified. sRGB is a good choice, and P3 is also fine (it's only on the most saturated colors that P3 will get clipped on non-P3 displays). Here's an example from the "Regular" color scheme that shows how to specify a color in sRGB:
The values given are in sRGB but iTerm2 displays values in P3. As you can see, Digital Color Meter confirms they are the same (+/- rounding error of 1): |
A number of the builtin themes seem to be out of date.
For example,
builtin dark
theme in iterm2 has it's red set toc91b00
, but that hex value does not appear anywhere in thebuiltin dark
theme in this repository.https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/xfce4terminal/colorschemes/Builtin%20Dark.theme:
The text was updated successfully, but these errors were encountered: