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

list suggested terminal themes #103

Closed
stevemao opened this issue Feb 25, 2020 · 3 comments · Fixed by #107
Closed

list suggested terminal themes #103

stevemao opened this issue Feb 25, 2020 · 3 comments · Fixed by #107

Comments

@stevemao
Copy link

On my iterm dark theme and the blue colour is a bit hard to see. Would be great if you could recommend some colour theme.
Screen Shot 2020-02-26 at 10 35 01 am

@dandavison
Copy link
Owner

Agreed, thanks for reporting this. Delta doesn't (yet) have its own concept of colour theme for the structural elements surrounding the diff (it does allow syntax highlighting themes to be chosen which apply to the code in the diff itself). The blue you point out is hard-coded, so the simplest fix might be to introduce a command-line option allowing that colour to be specified.

(Ref #99 -- this issue and #99 are basically the same.)

dandavison added a commit that referenced this issue Feb 26, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
dandavison added a commit that referenced this issue Feb 26, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
@dandavison
Copy link
Owner

dandavison commented Feb 26, 2020

I'm working on a branch that will allow all colors to be specified as either RGB, or as an ANSI terminal code, using command line options.

By the way, that blue color is not specified as RGB by Delta: it's ANSI terminal color code 34 ("blue foreground"). I.e. the actual displayed colour is controlled by your terminal emulator, so there's a quick fix if you're happy with altering that blue everywhere. In my terminal (iTerm2), I can change it like this:

image

dandavison added a commit that referenced this issue Feb 27, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
dandavison added a commit that referenced this issue Feb 27, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
dandavison added a commit that referenced this issue Feb 27, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
dandavison added a commit that referenced this issue Feb 27, 2020
- Fixes #99, #103
- Support both RGB and ANSI codes
- Eliminate (almost) ansi_term crate in favor of syntect for representing colors
@dandavison
Copy link
Owner

I've merged a branch which allows all colors to be configured using command line options. The new options are described in the --help output:

--commit-color <commit_color>              Color for the commit section of git output. [default: yellow]
--commit-style <commit_style>                                                                   
    Formatting style for the commit section of git output. Options are: plain, box. [default: plain]

--file-color <file_color>                  Color for the file section of git output. [default: blue]
--file-style <file_style>
    Formatting style for the file section of git output. Options are: plain, box, underline. [default:
    underline]                                                                                  
--hunk-color <hunk_color>                  Color for the hunk-marker section of git output. [default: blue]
--hunk-style <hunk_style>
    Formatting style for the hunk-marker section of git output. Options are: plain, box. [default: box]

along with a section describing how to specify colors:

Colors
------

All delta color options work the same way. There are two ways to specify a color:

1. RGB hex code

   An example of passing an RGB hex code is:
   --file-color="#0e7c0e"

2. ANSI color name

   There are 8 ANSI color names:
   black, red, green, yellow, blue, magenta, cyan, white.

   In addition, all of them have a bright form:
   bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white

   An example is:
   --file-color="green"

   Unlike RGB hex codes, ANSI color names are just names: you can choose the exact color that each
   name corresponds to in the settings of your terminal application (the application you use to run
   command line programs). This means that if you use ANSI color names, and you change the color
   theme used by your terminal, then delta's colors will respond automatically, without needing to
   change the delta command line.

   "purple" is accepted as a synonym for "magenta". Color names and codes are case-insensitive.

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