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

Inconsistency in the color reproduction #354

Open
poetaman opened this issue Feb 10, 2022 · 5 comments
Open

Inconsistency in the color reproduction #354

poetaman opened this issue Feb 10, 2022 · 5 comments

Comments

@poetaman
Copy link

poetaman commented Feb 10, 2022

I liked the Ubuntu theme of iTerm2, and thought to use it elsewhere. To my surprise the color turned out to be darker than the one that iTerm2 used. To remove the discrepancy that could be caused by the way different terminals could be rendering colors, I tried the hex value of background from windowsterminal directory's Ubuntu.json in a different pane of iTerm2. As can be seen in the image below, they are different colors!

FYI, I see such discrepancy in many background colors, not sure if its the case for all of them; wouldn't be surprised if thats indeed the case. As a sidenote, I like the colors that iTerm2 produces, and would like to faithfully reproduce them in other terminals. So in the below example, I would want windowsterminal files to be updated :)

iTerm2:

<key>Background Color</key>
<dict>
<key>Blue Component</key>
<real>0.14117647707462311</real>
<key>Green Component</key>
<real>0.039215687662363052</real>
<key>Red Component</key>
<real>0.18823529779911041</real>
</dict>

This is shown as #3f0e2f in iTerm2's color settings, which is different from #300a24 in the windowsterminal json below.

windowsterminal:

"background": "#300a24",

Screen Shot 2022-02-09 at 7 48 16 PM

@jdhmtl
Copy link
Collaborator

jdhmtl commented Feb 10, 2022

Interesting. I loaded up the Ubuntu theme in iTerm and got #300a24 for the background colour, as expected from the decimal values in the definition.
Screen Shot 2022-02-10 at 9 20 44 AM

@poetaman
Copy link
Author

poetaman commented Feb 11, 2022

@jdhmtl Its the same with other color schemes... I tried Adventure Time, and that is different too... In the image below the lighter colors are of colorschemes in iterm2, and darker ones are from the windowsterminal directory in this repo. IMO the lighter ones look more lively, easily distinguishable, and easier to read. The top 2 colors are for Ubuntu colorscheme, and the bottom two are for Adventure Time.

Screen Shot 2022-02-11 at 11 38 01 AM

@poetaman
Copy link
Author

poetaman commented Feb 11, 2022

@gnachman Not sure what is going on, if its a bug, I would want this bug to continue :) or be converted into a feature. Is there a way to export a colorscheme to json? That would be great.

Btw, the difference is not just for background, but for other colors too. So it works pretty well...

@IlanCosman
Copy link

Oh yah, sorry, forgot to change my issue's title 😅 I think this is the same issue as #349. It has to do with color spaces.

@gnachman
Copy link

You need to set a colorspace in your preset, otherwise the actual color will be device-dependent.
Example:

        <dict>
                <key>Alpha Component</key>
                <real>1</real>
                <key>Blue Component</key>
                <real>0.11764705926179886</real>
                <key>Color Space</key>
                <string>sRGB</string>
                <key>Green Component</key>
                <real>0.098039217293262482</real>
                <key>Red Component</key>
                <real>0.078431375324726105</real>
        </dict>

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

No branches or pull requests

4 participants