urxvt bold colors are wrong - bold #0-7 are using colors from #8-15

10

2

My colors are off. Specifically, the bold version of colors 1-6 is broken:

enter image description here

The color of each (emboldened) index should match the color of the text beside it. It does not.

This is generated from this gist, modified to include colors #0-15. (It's identical except the , 16 on line 25 is removed.)

Update:

Here's what's going on: Bold #1 is using color #9, bold #2 is using color #10 and so on. I confirmed this by changing color9, color10, etc. in my .Xresources file.

I'm using solarized .Xresources and would rather keep colors #9-15 colored differently.

Furthermore, the bold colors are correct in xterm.

Why is urxvt Bold #0-7 using colors from #8-15, and how do I stop this?

So8res

Posted 2012-11-29T01:19:59.847

Reputation: 1 401

Can you share your version of the script? It'd be helpful to see exactly what escape sequences you're sending. (e.g. intense vs. bold) – benizi – 2012-11-30T01:11:39.660

It's literally exactly the same, except the ", 16" on line 25 is removed. – So8res – 2012-11-30T04:59:05.770

Answers

15

Use the +is commandline flag, or (exactly equivalently), set the intensityStyles resource to false. From the man page:

intensityStyles: boolean

When font styles are not enabled, or this option is enabled (True, option -is, the default), bold/blink font styles imply high intensity foreground/background colours. Disabling this option (False, option +is) disables this behaviour, the high intensity colours are not reachable.

So, in .Xresources:

URxvt.intensityStyles: false

It's not clear which behavior is "right". (I prefer "bold" = "bold font".) Historically, some terminals treat SGR 1 ( \e[1m ) as "bold", and others treat it as "intense". Current terminals exhibit a mix of behaviors. Top row in each window is colors 0 through 15 in "bold". Second row is without "bold". (-bdc and +bdc is the XTerm equivalent of URxvt's -is and +is -- not sure why it only appears to affect color 0 on my system)

various terminals' treatment of bold vs intense

script to run the terminals in this image

benizi

Posted 2012-11-29T01:19:59.847

Reputation: 527

It's xterm +/-pc (and not +/-bdc) that is equivalent to urxvt +/-is. "not sure why it only appears to affect color 0" – because you used the wrong option :-) I could fix your post but I don't feel like retaking the screenshots :-) – egmont – 2019-03-18T09:27:38.897

On a side note, GNOME Terminal 3.32 / VTE 0.56 switched its default to "bold only", equivalent to xterm +pc and urxvt +is. – egmont – 2019-03-18T09:29:29.090

2Wow, terminal emulators really are a ghetto. Thank you very much, this was bugging the hell out of me. – So8res – 2012-11-30T06:55:44.730