11

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
  • 1,521
  • 1
  • 18
  • 30
  • 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 Nov 30 '12 at 01:11
  • It's literally exactly the same, except the ", 16" on line 25 is removed. – So8res Nov 30 '12 at 04:59

1 Answers1

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
  • 537
  • 5
  • 15
  • 2
    Wow, terminal emulators really are a ghetto. Thank you very much, this was bugging the hell out of me. – So8res Nov 30 '12 at 06:55
  • 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 Mar 18 '19 at 09:27
  • 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 Mar 18 '19 at 09:29