morhetz / gruvbox-contrib

Ports of the gruvbox colorscheme
1.66k stars 362 forks source link

urxvt256 does not obey colors beyond 0-15 in .Xresources #65

Open ignacio-vc opened 6 years ago

ignacio-vc commented 6 years ago

According to https://github.com/morhetz/gruvbox/wiki/Terminal-specific , one of the methods to get urxvt256 to load the correct colors in terminal vim is to include the colors in my .Xresources and source it with xrdb, so that is what I did. The terminal accepts the first 16 colors, but the commands to change the colors beyond 16 are not heeded. I checked the palette before and after sourcing the bash script provided for the color corrections, and the changes that it applies are definitely still needed to get the correct color scheme in terminal vim.

The workaround in urxvt256 right now for me is to source the bash script in my .bashrc right now, but I thought I'd report that the method with .Xresources you mention isn't working with me. I'm on Debian Sid if that makes any difference.

Do you have any idea if there's something I'm missing for the Xresources method to work, or is it something on urxvt's end? I include my .Xresources just in case it helps

  1 !URxvt.termName:             rxvt-unicode-256color
  2 URxvt.font:                 xft:Inconsolata-g:size=11:hinting=true:antialias=true
  3 URxvt.letterSpace:          -1
  4 URxvt.loginShell:           true
  5 URxvt.scrollTtyKeypress:    true.
  6 URxvt.scrollTtyOutput:      false
  7 URxvt.scrollWithBuffer:     false
  8 URxvt.scrollBar:            false
  9 URxvt.fading:               30
 10 URxvt.internalBorder:       0
 11 URxvt.externalBorder:       0
 12 URxvt.url-launcher:         /usr/bin/firefox
 13 URxvt.depth:                32
 14 URxvt.intensityStyles:      false
 15 
 16 rofi.color-enabled:         true
 17 rofi.color-window:          #000, #000, #000
 18 rofi.color-normal:          #111, #819396, #222, #008ed4, #ffffff
 19 rofi.color-active:          #002b37, #008ed4, #003643, #008ed4, #66c6ff
 20 rofi.color-urgent:          #002b37, #da4281, #003643, #008ed4, #890661
 21 rofi.fake-transparency:     true
 22 rofi.lines:                 3
 23 rofi.bw:                    0
 24 rofi.opacity:               "10"
 25 rofi.hide-scrollbar:        true
 26 rofi.width:                 30
 27 rofi.terminal:              urxvt
 28 rofi.run-command:           {cmd}
 29 rofi.run-shell-command:     {terminal} -e {cmd}

... Commented out Gruvbox Color Table for reference

 78 #define dark0_hard      #1d2021
 79 #define dark0           #282828
 80 #define dark0_soft      #32302f
 81 #define dark1           #3c3836
 82 #define dark2           #504945
 83 #define dark3           #665c54
 84 #define dark4           #7c6f64
 85 #define gray            #928374
 86 #define light0_hard     #f9f5d7
 87 #define light0          #fbf1c7
 88 #define light0_soft     #f2e5bc
 89 #define light1          #ebdbb2
 90 #define light2          #d5c4a1
 91 #define light3          #bdae93
 92 #define light4          #a89984
 93 #define bright_red      #fb4934
 94 #define bright_green    #b8bb26
 95 #define bright_yellow   #fabd2f
 96 #define bright_blue     #83a598
 97 #define bright_purple   #d3869b
 98 #define bright_aqua     #8ec07c
 99 #define bright_orange   #fe8019
100 #define neutral_red     #cc241d
101 #define neutral_green   #98971a
102 #define neutral_yellow  #d79921
103 #define neutral_blue    #458588
104 #define neutral_purple  #b16286
105 #define neutral_aqua    #689d6a
106 #define neutral_orange  #d65d0e
107 #define faded_red       #9d0006
108 #define faded_green     #79740e
109 #define faded_yellow    #b57614
110 #define faded_blue      #076678
111 #define faded_purple    #8f3f71
112 #define faded_aqua      #427b58
113 #define faded_orange    #af3a03
114  
115 *background:            light0
116 *foreground:            dark0
117 
118 *color0:                light0
119 *color1:                neutral_red
120 *color2:                neutral_green
121 *color3:                neutral_yellow
122 *color4:                neutral_blue
123 *color5:                neutral_purple
124 *color6:                neutral_aqua
125 *color7:                dark4
126 *color8:                gray
127 *color9:                faded_red
128 *color10:               faded_green
129 *color11:               faded_yellow
130 *color12:               faded_blue
131 *color13:               faded_purple
132 *color14:               faded_aqua
133 *color15:               dark1
134 
135 URxvt.color234:         dark0_hard
136 URxvt.color235:         dark0
137 URxvt.color236:         dark0_soft
138 URxvt.color237:         dark1
139 URxvt.color239:         dark2
140 URxvt.color241:         dark3
141 URxvt.color243:         dark4
142 
143 URxvt.color244:         gray
144 URxvt.color245:         gray
145 
146 URxvt.color230:         light0_hard
147 URxvt.color229:         light0
148 URxvt.color228:         light0_soft
149 URxvt.color223:         light1
150 URxvt.color250:         light2
151 URxvt.color248:         light3
152 URxvt.color246:         light4
153 
154 URxvt.color167:         bright_red
155 URxvt.color142:         bright_green
156 URxvt.color214:         bright_yellow
157 URxvt.color109:         bright_blue
158 URxvt.color175:         bright_purple
159 URxvt.color108:         bright_aqua
160 URxvt.color208:         bright_orange
161 
162 URxvt.color88:          faded_red
163 URxvt.color100:         faded_green
164 URxvt.color136:         faded_yellow
165 URxvt.color24:          faded_blue
166 URxvt.color96:          faded_purple
167 URxvt.color66:          faded_aqua
168 URxvt.color130:         faded_orange
lukas235 commented 6 years ago

Hey @ignacio-vc, were you able to solve the issue in the meantime? I am facing the same colour problems! Many thanks in advance!

KornelJahn commented 5 years ago

Adding this Perl extension to urxvt solved the issue for me: https://github.com/Roliga/urxvt-xresources-256