Re: [PATCH 2/2] color: support "default" to restore fg/bg color

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-10-25 at 22:32:36, Robert Estelle via GitGitGadget wrote:
> From: Robert Estelle <robertestelle@xxxxxxxxx>
> 
> The name "default" can now be used in foreground or background colors,
> and means to use the terminal's default color, discarding any
> explicitly-set color without affecting the other attributes. On many
> modern terminals, this is *not* the same as specifying "white" or
> "black".
> 
> Although attributes could previously be cleared like "no-bold", there
> had not been a similar mechanism available for colors, other than a full
> "reset", which cannot currently be combined with other settings.
> 
> Note that this is *not* the same as the existing name "normal", which is
> a no-op placeholder to permit setting the background without changing
> the foreground. (i.e. what is currently called "normal" might have been
> more descriptively named "inherit", "none", "pass" or similar).

I can't speak to whether this is correct, although you did mention the
standard, so I assume it is, but I do think this is a good feature to
have and the patch seems sane to me.  Patch 2 also looked good here.

For an example of why this differs from white on black, let me mention
that I use a semi-transparent terminal, where a black background is
opaque black, and the default is semi-transparent.  I assume other
possibilities include patterned backgrounds (Enlightenment, anyone?).
Whether you want to include something to this effect in the commit
message is up to you, but I provide it for the interested reader.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux