Re: [PATCH] log: support 256 colors with --graph=256colors
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Dec 25, 2016, 02:36 UTC
- Message-ID
- <CACsJy8ANbXZWOV+zN-S8c8V0aTWZ4DHZ=GVmuuAqmY=oFh8T-Q@mail.gmail.com>
- In-Reply-To
- <xmqqtw9vg4vh.fsf@gitster.mtv.corp.google.com>
On Fri, Dec 23, 2016 at 2:06 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> If I were doing this, I'd just prepare a table with 32 color slots > or so [*1*], start at a random spot (say 017:00005f) of > > https://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg, > > and pick spots by jumping southeast like a chess knight > (i.e. 017->030->043->086->...) until the table is filled, wrapping > around at the edge of that color chart as necessary.
If you want to play with that, [1] may help, which sorts colors in hsv space, and you can select a few colors to see how they look, either manually or by calculation. Yeah we probably get maybe 32 (or 48 if you stretch it a bit) distinct colors. Not sure if it's any better with true color terminals, probably not.
[1] https://gist.github.com/pclouds/616b67f0b5a9b20d74373286574cd0ac
-- Duy