taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

when color.alternate is set to change the background, bold is always removed from text on alternate rows

Open bgravato opened this issue 4 years ago • 1 comments

Running taskwarrior 2.6.1.

When color.alternate is set to change the background with "on something", bold is removed from the rows that have the alternate background.

For example: color.alternate=on gray5

Even if I set bold on color.alternate (example: color.alternate=bold magenta on gray5) it will not be bold on the row with the gray5 background. In the give example text color will change to magenta (when no other higher priority color applies), but it won't turn bold. Lines that would normally be bold, will have bold removed on the lines with gray5 background.

If I don't set "on something" in color.alternate (for example: color.alternate=magenta), then bold will be preserved.

If I set bold for alternate (eg. color.alternate=bold magenta), alternate rows will be bold (and magenta).

To sum up: if background is not set in color.alternate it will work as expected, but if "on somecolor" is set, bold is always removed from alternate rows.

bgravato avatar Nov 05 '21 17:11 bgravato

The problem are the 256- and 16-color spaces, see issue [TW-585] bold only respects "named" colors #620 As stated in the man task-color when mixing 16- and 256-colors:

Note also that there is no bold or bright attributes when dealing with 256 colors, but there is still underline available.

The "named" colors are part of the 16-colors so they will work, but not for gray, rgb or color. Try color.alternate=bold on magenta, that test should work. If you use a dark theme, I use the solarized-dark-256 theme, try black as the background, it worked for me, as it appears as gray.

xjjak avatar Jan 23 '22 11:01 xjjak