dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
21.33k stars 358 forks source link

🐛 Colours different on different systems. #1648

Open vext01 opened 3 months ago

vext01 commented 3 months ago

Hi,

I've just been trying delta today. I got it all configured how I like it, copied the config to a remote system, and the colours all look different for some reason.

image

The screenshot shows the output of diff -u 1 2 | delta --color-only on an OpenBSD system (where it looks correct) and on a remote Debian system over ssh. The screenshots are inside tmux, but the output is still incorrect on Debian outside of tmux.

Any idea why?

My delta config:

[core]
    pager = "delta --color-only"

[delta]
    light = false
    theme = gruvbox-dark
    keep-plus-minus-markers = true
    file-style = "magenta normal"
    zero-style = "normal normal"
    plus-style = "green #26342c"
    plus-emph-style = "green #2b4134"
    minus-style = "red #342626"
    minus-emph-style = "#d95a5a #562222"
    true-color = always
dandavison commented 3 months ago

Hm, so this is the same terminal emulator and what differs is the delta executable and the fact that delta's output is coming over SSH, is that right?

I am not sure what the problem is, but my first impression is that it looks like 24bit color ("truecolor") is not being supported correctly in the panel on the right. Have you tried comparing the raw output by piping into cat -A or bat -A or a hexdump etc? Perhaps you can hone in on the problem by creating a file containing ANSI escaped text such that cating it to the terminal in the two contexts reproduces the difference?