Re: [dev] [PATCH] Don't make bold text bright with default color

From: Yuri Karaban <>
Date: Mon, 21 Apr 2014 22:13:48 +0300

Hi all!

I was about to patch st today, when I realized that if I define
foreground and background color indexes to be _outside_ 256 color
palette, behavior with the brightening of the bold face would be
consistent with other terminals (st just don't know how to brighten the
index which is outside of color array, thus brightening would be

So instead of patching it worth adding to FAQ:

Q: Why st brightens the bold face with default color, while other
   terminals don't?
A: You can achieve compatible behavior by placing defaultfg outside of
   first 256 palette entries.

And when someone next would complain about difference in behavior with
other terminal you can point to FAQ to learn how to achieve desired

Probably it would be also reasonable to set sample defaultfg, defaultbg
(defaultcs already above the first 256 entries) to values outside of
first 256 entries in config.def.h (or even make
defaultfg/defaultbg/defaultcs indexes constant).

Regarding my side note about brightening bold face on dark background,
and darkening it on light background. Palette can be flipped during
initialization, depending on background color luminosity, bright colors
can become dark and vice versa. It could be a reasonable change, but it
would be confusing to user and it would be incompatible with other
terminals (with all consequences). Therefore I don't think introducing a
new peculiarity would be a good idea (My original idea was polar
opposite: to make behavior consistent with other terminals ;-))

>>>>> "CL" == Christoph Lohmann <> writes:

    CL>> Your idea of moving fg and bg out of the color array is
    CL>> interesting and might add the semantics of a relative
    CL>> »background« or »foreground« color to a dynamic selected custom
    CL>> color.

Labor omnia vincit.
Received on Mon Apr 21 2014 - 21:13:48 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 21 2014 - 21:24:05 CEST