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

Green highlight is too bright for comments #71

Closed
YaLTeR opened this issue Dec 11, 2019 · 5 comments · Fixed by #73
Closed

Green highlight is too bright for comments #71

YaLTeR opened this issue Dec 11, 2019 · 5 comments · Fixed by #73

Comments

@YaLTeR
Copy link

YaLTeR commented Dec 11, 2019

The inserted word is basically invisible:
image
On regular code it's fine but could still be less bright:
image

Themes I tried: default, OneHalfDark. Terminal: alacritty. Alacritty theme: base16-ocean.

@dandavison
Copy link
Owner

Hi @YaLTeR, the choice of theme determines the foreground color of the text for syntax highlighting, but it does not determine the background color. To select the background color, delta provides options --minus-color, --minus-emph-color, --plus-color, --plus-emph-color allowing the 4 background colors to be specified as hex codes, so with a 24-bit color-capable terminal emulator there is a lot of choice! To quickly try out colors, the --show-background-colors option can be useful.

It sounds like you want to experiment with the value of --plus-emph-color.

I don't have a terminal emulator with base16-ocean theme installed, but the dark mode defaults used by delta were chosen for a black terminal background. Is the answer here to choose your own custom colors for base16-ocean?

@YaLTeR
Copy link
Author

YaLTeR commented Dec 12, 2019

FWIW with completely black background (alacritty defaults) it's the same issue:
image

I can play with --plus-emph-color, just trying to figure out if it is perhaps an issue with the default value?

@dandavison
Copy link
Owner

Oh I'm sorry, yes you're absolutely right. The default --plus-emph-color in commented text on a black / dark terminal background is unreadable. Have you found an alternative color you like?

Honestly, I have struggled with finding good defaults for delta on a dark background. I think it looks great on a light background with the defaults (e.g. white, or I sometimes use the iTerm2 "material" theme which is a sort of very light pearl gray background). But I'd always felt that we can find better defaults for dark.

image

image

@YaLTeR
Copy link
Author

YaLTeR commented Dec 12, 2019

#005000 seems to work better. I can't quite strike a good balance between enough highlight and comment color legibility.

image
image

On a related note, --show-background-colors drops leading zeros from individual color bytes making it really hard to tell what the actual values are. E.g. for the default --plus-emph-color it shows #e7ce and you can only guess that it's actually #0e7c0e.

dandavison added a commit that referenced this issue Dec 12, 2019
@dandavison
Copy link
Owner

Great thanks, I think I'll go with #006000 for now.

--show-background-colors drops leading zeros from individual color bytes making it really hard to tell what the actual values are.

Yes, agreed!

current (#0e7c0e)
image

#006000
image

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

Successfully merging a pull request may close this issue.

2 participants