Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: possible PATCH to colors function



On Tue, Jul 18, 2023 at 12:27 PM Jim <linux.tech.guy@xxxxxxxxx> 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: bold-is-bold-and-bright.jpg
Description: JPEG image

Attachment: bold-is-bold.jpg
Description: JPEG image



Messages sorted by: Reverse Date, Date, Thread, Author