[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96b17bae-47f7-4b2d-8874-7fb89ecc052a@gedalya.net>
Date: Thu, 23 May 2024 15:08:20 +0800
From: Gedalya <gedalya@...alya.net>
To: Sirius <sirius@...dheim.com>
Cc: netdev@...r.kernel.org
Subject: Re: iproute2: color output should assume dark background
On 5/23/24 2:39 PM, Sirius wrote:
> what terminal background should be used,
It's not about prescribing what should, but about guessing what is, when that is not explicitly stated. The only "right" way to guess is to always choose what is more probable (common, in this case).
> read what the background is of the console
That's COLORFGBG. It is set by some terminal emulators as a way to advertise the colors being used.
I'm no expert but AFAIK there is no uniform way to do this that is supported by all major terminal emulators.
> adapt the foreground colours to that. I would guess that means holding two
> sets of the eight colours and if the background is "dark", use the lighter
> set and if the background is "light", use the darker set.
That's what iproute2 currently does.
In fact this can't be adequate. You can't turn the question of best contrast against 16(million?) different colors into a binary. But this is a simple CLI command, not a full-screen productivity app.
Powered by blists - more mailing lists