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

🐛 git blame color not readable on konsole #714

Closed
pickfire opened this issue Sep 13, 2021 · 4 comments
Closed

🐛 git blame color not readable on konsole #714

pickfire opened this issue Sep 13, 2021 · 4 comments

Comments

@pickfire
Copy link

pickfire commented Sep 13, 2021

Screenshot_20210913_133954

Color is white but those are the default 256 color but it's wrong.

git config

[core]
        pager = delta

uname -a

Linux mi 5.14.2-zen1-2-zen #1 ZEN SMP PREEMPT Thu, 09 Sep 2021 09:42:32 +0000 x86_64 GNU/Linux

environment variables

TERM=xterm-256color  # even when I used konsole-direct it still have the same issue
COLORTERM=truecolor

delta 0.8.4

@Kr1ss-XD
Copy link
Contributor

Hi @pickfire !

You might want to experiment with the --blame-palette parameter, or the according gitconfig option delta.blame-palette. This enables you to customize the background colors in blame output that's handled by delta.

Please keep in mind that the feature is still in an early state, there's no mention in the project's README yet. Although you can consult this comment by @dandavison as to how it works, and there's a short summary in the output of delta --help.

Dan mentioned also that there will probably be two defaults at some point, one for dark themes and another for light ones.


By the way, if you want blame output not to be handled by delta, but rather by a normal pager, a good way to go woud be a gitconfig like :

[core]
	pager	= less
[pager]
	blame	= true
	diff	= delta
	show	= delta
	log		= delta
	stash	= delta
	; asf, with all the subcommands you want to pipe their output to delta

Cheers !

@dandavison
Copy link
Owner

Hi @pickfire, can you try with the latest version? Delta now has different default blame-palette values for light and dark.

@pickfire
Copy link
Author

Yup, it works nicely now. But I am curious how it can support both.

@dandavison
Copy link
Owner

Great.

I am curious how it can support both.

It was basically a bug that it was giving you those light colors before. By default, delta assumes the user has a dark terminal background. Users who have a light terminal background have to set light = true in delta settings. So by default the blame background is for dark, but if you have light = true it will be light. There's no (not yet) any magical autodetection of terminal background colors or of system light vs dark mode.

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

3 participants