Open poetaman opened 2 years ago
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.
@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.
@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...
Oh yah, sorry, forgot to change my issue's title 😅 I think this is the same issue as https://github.com/mbadolato/iTerm2-Color-Schemes/issues/349. It has to do with color spaces.
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>
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: https://github.com/mbadolato/iTerm2-Color-Schemes/blob/801bdde78b5e8077c4a3614f51870367fd638e37/schemes/Ubuntu.itermcolors#L149-L157
This is shown as
#3f0e2f
in iTerm2's color settings, which is different from#300a24
in the windowsterminal json below.windowsterminal: https://github.com/mbadolato/iTerm2-Color-Schemes/blob/801bdde78b5e8077c4a3614f51870367fd638e37/windowsterminal/Ubuntu.json#L19