zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: linuxtechguy@gmail.com
Cc: Bart Schaefer <schaefer@brasslantern.com>, devs <zsh-workers@zsh.org>
Subject: Re: possible PATCH to colors function
Date: Tue, 18 Jul 2023 13:18:23 +0200	[thread overview]
Message-ID: <CAN=4vMqFfbYyQ8s6H27D2DPToFr=22PjL=EBJMzUpXw=R+zCbQ@mail.gmail.com> (raw)
In-Reply-To: <CA+rB6GLyX0woKcZT_iCJ0zD6uoh319FJT6Q+cgaWWRZQmpumVA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

On Tue, Jul 18, 2023 at 12:27 PM Jim <linux.tech.guy@gmail.com> wrote:
>
>
> I get the same results with your code.  But the patch has to do with ${color[bold]}.
> Without faint the result of bold is the same for <color> and <bright-color>.  With
> faint the result is different intensity.

I haven't been following this discussion very closely. It's not
unlikely that my comment will miss the mark.

Most graphical terminal emulators have an option that controls the
meaning of bold. In GNOME Terminal it's the checkbox "Show bold text
in bright colors". It can be found on the "Colors" tab. If unchecked,
bold text is rendered with the bold font and the same color as regular
text. This is similar to the meaning of bold in rich text editors. If
checked, bold text with the colors 0-7 (inclusive) gets rendered with
the original color plus 8. Note that adding 8 to the color doesn't
necessarily result in a brighter color. The actual result depends on
the terminal's color palette.

I've attached two screenshots that show the output of the following
command in GNOME Terminal with Tango palette:

    print -P $'%4F4\n%12F12\n%B%4F4bold\n%12F12bold%f%b'

- bold-is-bold.jpg: "Show bold text in bright colors" unchecked.
- bold-is-bold-and-bright.jpg: "Show bold text in bright colors" checked.

FWIW, I always uncheck "Show bold text in bright colors" or its
equivalent in all terminals that I use. I want "bold" to mean the same
thing in the terminal as everywhere else: use the bold font, keep the
same color. In addition, I find it counterintuitive when bold text
changes its color ONLY if the original color was in 0-7.

Roman.

[-- Attachment #2: bold-is-bold-and-bright.jpg --]
[-- Type: image/jpeg, Size: 14044 bytes --]

[-- Attachment #3: bold-is-bold.jpg --]
[-- Type: image/jpeg, Size: 13843 bytes --]

  reply	other threads:[~2023-07-18 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 17:44 Jim
2023-07-17 18:40 ` Bart Schaefer
2023-07-17 18:48   ` Bart Schaefer
2023-07-18 10:26     ` Jim
2023-07-18 11:18       ` Roman Perepelitsa [this message]
2023-07-18 12:48         ` Jim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN=4vMqFfbYyQ8s6H27D2DPToFr=22PjL=EBJMzUpXw=R+zCbQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).