{"thread":{"id":"46080","subject":"Coloring","startedAt":"2017-05-31T18:33:37Z","lastAt":"2017-05-31T21:23:08Z","messageCount":5,"participants":["Irving Rabin","Samuel Lijin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"321150","messageId":"CAD1ypiWOcKaLJJzZC=gw75EDFnw_1ZqC94B5p9i722T-sijN1Q@mail.gmail.com","threadId":"46080","inReplyTo":null,"subject":"Coloring","fromName":"Irving Rabin","fromEmail":"irving@edmodo.com","sentAt":"2017-05-31T18:33:31Z","receivedAt":"2017-05-31T18:33:37Z","isPatch":false,"sender":{"key":"irving@edmodo.com","avatar":null},"body":"Folks, I am reporting an issue with coloring of the output of Git\ncommands, like status, diff, etc.\n\nSpecifically, if the field is supposed to be white, it doesn't mean it\nshould be literally 0xFFFFFF. It should be the color that I have\nconfigured as White color for my console emulator.\n\nI like light-screen terminals, and I configure my ANSI colors in the\nway that they are clearly visible on the background and clearly\ndistinct between themselves. In my terminal settings background is\nlight-yellow, Black is black, Yellow is brown, Red is dark red,\nMagenta is purple and White is dark gray. I set it once and I can use\nit everywhere - all Unix commands work correctly, I can edit\nhighlighted source code in Vim, and all my color settings are\nrespected.\n\nHowever Git behaves differently. When I run git diff, some of the\noutput is literally white on light yellow background. It is like \"we\nknow what is White, so we ignore your settings\". And it is quite\nirritating.\n\nIs there a way to make Git respect terminal settings and not to\noverride them with absolute colors? If so, please advise. If not, then\nI guess it is a bug to fix, right?\n\nThanks,\nIrving Rabin\nSoftware Developer @Edmodo\n408-242-1299\n"},{"id":"321155","messageId":"CAJZjrdWrrZBCR0xQMSFbCL6rwPThNNitkUA2AoOhOWQkxkUv9g@mail.gmail.com","threadId":"46080","inReplyTo":"CAD1ypiWOcKaLJJzZC=gw75EDFnw_1ZqC94B5p9i722T-sijN1Q@mail.gmail.com","subject":"Re: Coloring","fromName":"Samuel Lijin","fromEmail":"sxlijin@gmail.com","sentAt":"2017-05-31T19:07:41Z","receivedAt":"2017-05-31T19:08:27Z","isPatch":false,"sender":{"key":"sxlijin@gmail.com","avatar":"https://gravatar.com/avatar/01777bf1eae64e2b4dca97dcac182a6abbcf6fd8cb4d5b8fa33edf9f8cc21746?d=mp&s=160"},"body":"On Wed, May 31, 2017 at 2:33 PM, Irving Rabin <irving@edmodo.com> wrote:\n>\n> Folks, I am reporting an issue with coloring of the output of Git\n> commands, like status, diff, etc.\n>\n> Specifically, if the field is supposed to be white, it doesn't mean it\n> should be literally 0xFFFFFF. It should be the color that I have\n> configured as White color for my console emulator.\n>\n> I like light-screen terminals, and I configure my ANSI colors in the\n> way that they are clearly visible on the background and clearly\n> distinct between themselves. In my terminal settings background is\n> light-yellow, Black is black, Yellow is brown, Red is dark red,\n> Magenta is purple and White is dark gray. I set it once and I can use\n> it everywhere - all Unix commands work correctly, I can edit\n> highlighted source code in Vim, and all my color settings are\n> respected.\n\nCan you elaborate on how it is that you redefine your terminal color\nscheme? There are multiple levels at which you can do that, which will\nhave some bearing on the answer.\n\n> However Git behaves differently. When I run git diff, some of the\n> output is literally white on light yellow background. It is like \"we\n> know what is White, so we ignore your settings\". And it is quite\n> irritating.\n>\n> Is there a way to make Git respect terminal settings and not to\n> override them with absolute colors? If so, please advise. If not, then\n> I guess it is a bug to fix, right?\n>\n> Thanks,\n> Irving Rabin\n> Software Developer @Edmodo\n> 408-242-1299\n"},{"id":"321162","messageId":"20170531210448.6kolid5umzyasxnc@sigill.intra.peff.net","threadId":"46080","inReplyTo":"CAD1ypiWOcKaLJJzZC=gw75EDFnw_1ZqC94B5p9i722T-sijN1Q@mail.gmail.com","subject":"Re: Coloring","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-05-31T21:04:48Z","receivedAt":"2017-05-31T21:04:55Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 31, 2017 at 11:33:31AM -0700, Irving Rabin wrote:\n\n> Specifically, if the field is supposed to be white, it doesn't mean it\n> should be literally 0xFFFFFF. It should be the color that I have\n> configured as White color for my console emulator.\n> \n> I like light-screen terminals, and I configure my ANSI colors in the\n> way that they are clearly visible on the background and clearly\n> distinct between themselves. In my terminal settings background is\n> light-yellow, Black is black, Yellow is brown, Red is dark red,\n> Magenta is purple and White is dark gray. I set it once and I can use\n> it everywhere - all Unix commands work correctly, I can edit\n> highlighted source code in Vim, and all my color settings are\n> respected.\n\nGit outputs ANSI color codes, which are interpreted by your terminal.\nYou _can_ configure Git to send 24-bit color codes if your terminal\nsupports it, but by default it uses the traditional set of limited color\nand attribute codes.\n\nWhat does running the following snippet in your shell look like?\n\n-- >8 --\n\nwhile read name code; do\n\tprintf '\\033[%sm%s\\033[m\\n' \"$code\" \"$name\"\ndone <<-\\EOF\nnormal\nbold 1\nred 31\ngreen 32\nyellow 33\nblue 34\nmagenta 35\ncyan 36\nbold-red 1;31\nbold-green 1;32\nbold-yellow 1;33\nbold-blue 1;34\nbold-magenta 1;35\nbold-cyan 1;36\nEOF\n\n-- 8< --\n\nIf any of the colors are not what you expect, is there a pattern? E.g.,\nI wouldn't be surprised if \"bold\" shows up as bright white. In many\nmodern terminal emulators, the bold variants need to be configured\nseparately from the non-bold ones, and default to lighter variants of\ntheir non-bold counterparts. The solution there would be to check your\nterminal emulator config.\n\nIf it does all look as you'd expect, try adding \"| less -R\" to the end of\nthe \"done <<-\\EOF\" line. Most of Git's output goes through that pager\n(though I _think_ it's mostly just passing through the ANSI codes, so it\nwouldn't have any effect).\n\n-Peff\n"},{"id":"321163","messageId":"CAD1ypiUDOtnKwctNQCHmxviPzkDPeP8FT_W2XEXrpHsfgC5Bhg@mail.gmail.com","threadId":"46080","inReplyTo":"20170531210448.6kolid5umzyasxnc@sigill.intra.peff.net","subject":"Re: Coloring","fromName":"Irving Rabin","fromEmail":"irving@edmodo.com","sentAt":"2017-05-31T21:10:45Z","receivedAt":"2017-05-31T21:10:52Z","isPatch":false,"sender":{"key":"irving@edmodo.com","avatar":null},"body":"Thanks Jeff, my problem has been resolved by Samuel Lijin.\nMy terminal settings didn't set bold which remained white. I fixed it\nand my problem was gone!\nThis issue is closed. Is there any way to retire it?\nIrving Rabin\nSoftware Developer @Edmodo\n408-242-1299\n\n\n\n\n\nOn Wed, May 31, 2017 at 2:04 PM, Jeff King <peff@peff.net> wrote:\n> On Wed, May 31, 2017 at 11:33:31AM -0700, Irving Rabin wrote:\n>\n>> Specifically, if the field is supposed to be white, it doesn't mean it\n>> should be literally 0xFFFFFF. It should be the color that I have\n>> configured as White color for my console emulator.\n>>\n>> I like light-screen terminals, and I configure my ANSI colors in the\n>> way that they are clearly visible on the background and clearly\n>> distinct between themselves. In my terminal settings background is\n>> light-yellow, Black is black, Yellow is brown, Red is dark red,\n>> Magenta is purple and White is dark gray. I set it once and I can use\n>> it everywhere - all Unix commands work correctly, I can edit\n>> highlighted source code in Vim, and all my color settings are\n>> respected.\n>\n> Git outputs ANSI color codes, which are interpreted by your terminal.\n> You _can_ configure Git to send 24-bit color codes if your terminal\n> supports it, but by default it uses the traditional set of limited color\n> and attribute codes.\n>\n> What does running the following snippet in your shell look like?\n>\n> -- >8 --\n>\n> while read name code; do\n>         printf '\\033[%sm%s\\033[m\\n' \"$code\" \"$name\"\n> done <<-\\EOF\n> normal\n> bold 1\n> red 31\n> green 32\n> yellow 33\n> blue 34\n> magenta 35\n> cyan 36\n> bold-red 1;31\n> bold-green 1;32\n> bold-yellow 1;33\n> bold-blue 1;34\n> bold-magenta 1;35\n> bold-cyan 1;36\n> EOF\n>\n> -- 8< --\n>\n> If any of the colors are not what you expect, is there a pattern? E.g.,\n> I wouldn't be surprised if \"bold\" shows up as bright white. In many\n> modern terminal emulators, the bold variants need to be configured\n> separately from the non-bold ones, and default to lighter variants of\n> their non-bold counterparts. The solution there would be to check your\n> terminal emulator config.\n>\n> If it does all look as you'd expect, try adding \"| less -R\" to the end of\n> the \"done <<-\\EOF\" line. Most of Git's output goes through that pager\n> (though I _think_ it's mostly just passing through the ANSI codes, so it\n> wouldn't have any effect).\n>\n> -Peff\n"},{"id":"321166","messageId":"CAJZjrdX=GAbfq8rJPcKb+dwgS6AoH56Q861j=XoAwZ=GXdhQVQ@mail.gmail.com","threadId":"46080","inReplyTo":"CAD1ypiUDOtnKwctNQCHmxviPzkDPeP8FT_W2XEXrpHsfgC5Bhg@mail.gmail.com","subject":"Re: Coloring","fromName":"Samuel Lijin","fromEmail":"sxlijin@gmail.com","sentAt":"2017-05-31T21:22:21Z","receivedAt":"2017-05-31T21:23:08Z","isPatch":false,"sender":{"key":"sxlijin@gmail.com","avatar":"https://gravatar.com/avatar/01777bf1eae64e2b4dca97dcac182a6abbcf6fd8cb4d5b8fa33edf9f8cc21746?d=mp&s=160"},"body":"On Wed, May 31, 2017 at 5:10 PM, Irving Rabin <irving@edmodo.com> wrote:\n>\n> Thanks Jeff, my problem has been resolved by Samuel Lijin.\n> My terminal settings didn't set bold which remained white. I fixed it\n> and my problem was gone!\n\nSpecifically, Irving's terminal rendered bold text as white. No bug here :)\n\n> This issue is closed. Is there any way to retire it?\n\nThat's pretty much it.\n\n> Irving Rabin\n> Software Developer @Edmodo\n> 408-242-1299\n>\n>\n>\n>\n>\n> On Wed, May 31, 2017 at 2:04 PM, Jeff King <peff@peff.net> wrote:\n> > On Wed, May 31, 2017 at 11:33:31AM -0700, Irving Rabin wrote:\n> >\n> >> Specifically, if the field is supposed to be white, it doesn't mean it\n> >> should be literally 0xFFFFFF. It should be the color that I have\n> >> configured as White color for my console emulator.\n> >>\n> >> I like light-screen terminals, and I configure my ANSI colors in the\n> >> way that they are clearly visible on the background and clearly\n> >> distinct between themselves. In my terminal settings background is\n> >> light-yellow, Black is black, Yellow is brown, Red is dark red,\n> >> Magenta is purple and White is dark gray. I set it once and I can use\n> >> it everywhere - all Unix commands work correctly, I can edit\n> >> highlighted source code in Vim, and all my color settings are\n> >> respected.\n> >\n> > Git outputs ANSI color codes, which are interpreted by your terminal.\n> > You _can_ configure Git to send 24-bit color codes if your terminal\n> > supports it, but by default it uses the traditional set of limited color\n> > and attribute codes.\n> >\n> > What does running the following snippet in your shell look like?\n> >\n> > -- >8 --\n> >\n> > while read name code; do\n> >         printf '\\033[%sm%s\\033[m\\n' \"$code\" \"$name\"\n> > done <<-\\EOF\n> > normal\n> > bold 1\n> > red 31\n> > green 32\n> > yellow 33\n> > blue 34\n> > magenta 35\n> > cyan 36\n> > bold-red 1;31\n> > bold-green 1;32\n> > bold-yellow 1;33\n> > bold-blue 1;34\n> > bold-magenta 1;35\n> > bold-cyan 1;36\n> > EOF\n> >\n> > -- 8< --\n> >\n> > If any of the colors are not what you expect, is there a pattern? E.g.,\n> > I wouldn't be surprised if \"bold\" shows up as bright white. In many\n> > modern terminal emulators, the bold variants need to be configured\n> > separately from the non-bold ones, and default to lighter variants of\n> > their non-bold counterparts. The solution there would be to check your\n> > terminal emulator config.\n> >\n> > If it does all look as you'd expect, try adding \"| less -R\" to the end of\n> > the \"done <<-\\EOF\" line. Most of Git's output goes through that pager\n> > (though I _think_ it's mostly just passing through the ANSI codes, so it\n> > wouldn't have any effect).\n> >\n> > -Peff\n"}]}