You are not logged in.

#1 2018-12-19 09:06:44

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

urxvt. can't set colors 16-255

$ echo $TERM
rxvt-unicode-256color

.color_theme (included in .Xresources)

#define nord0 #2E3440
#define nord1 #3B4252
#define nord2 #434C5E
#define nord3 #4C566A
#define nord4 #D8DEE9
#define nord5 #E5E9F0
#define nord6 #ECEFF4
#define nord7 #8FBCBB
#define nord8 #88C0D0
#define nord9 #81A1C1
#define nord10 #5E81AC
#define nord11 #BF616A
#define nord12 #D08770
#define nord13 #EBCB8B
#define nord14 #A3BE8C
#define nord15 #B48EAD

*.foreground:   nord4
*.background:   nord0
*.cursorColor:  nord4
*fading: 35
*fadeColor: nord3

*.color0: nord1
*.color1: nord11
*.color2: nord14
*.color3: nord13
*.color4: nord9
*.color5: nord15
*.color6: nord8
*.color7: nord5
*.color8: nord3
*.color9: nord11
*.color10: nord14
*.color11: nord13
*.color12: nord9
*.color13: nord15
*.color14: nord7
*.color15: nord6

*color16: #BF616A

256colors2.pl output
screen.png

So, I can't change colors from 16-255.

Last edited by Kirill Bugaev (2018-12-19 09:09:48)

Offline

#2 2018-12-19 13:56:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: urxvt. can't set colors 16-255

How are you attempting to change the colors?  You only have a single line in Xresources attempting to set color16, but this should not be expected to work for urxvt:

man urxvt wrote:

Only the first 16 can be changed using resources currently, the rest can only be changed via command sequences ("escape codes").


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-12-19 15:26:31

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: urxvt. can't set colors 16-255

Trilby, thanks a lot as usual. Shame on me and RTFM. I have found this . Does version of urxvt with such feature exist in AUR? I have tried rxvt-unicode-256xresources, but it doesn't support to change color16.

Last edited by Kirill Bugaev (2018-12-19 15:31:25)

Offline

#4 2018-12-19 15:49:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: urxvt. can't set colors 16-255

Your first link is just talking about being able to use 256 colors (the defaults) not change them.  The urxvt package in the repos uses 256 colors just fine, but only allows setting 0-15 via Xresources (higher colors can likely be set via escape codes).

The AUR package you linked to is designed to allow Xresource entries for higher-numbered colors.  If it doesn't work, you should contact the AUR maintainer.

Alternatively, you could try another terminal which makes it easy to set colors (in the case of `st` the colors are easy to specify, but it must be done at compile time in config.h).

As a side note, keep in mind that redefining colors higher than 15 could be ill-advised.  Some programs assume these numbers represent specific colors in the "xterm" color cube.  Colors 0-15 are assumed to be modifiable by the user (though there still is a standard expectation that 1/9 are redish, 2/10 yellowish, etc).

EDIT: I just tested that AUR package, and it works fine for me if I specify URxvt in the resources rather than a wildcard.

Last edited by Trilby (2018-12-19 15:54:13)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-12-20 01:50:34

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: urxvt. can't set colors 16-255

Trilby, thanks. I will migrate to `st`, when I learn C.

Offline

Board footer

Powered by FluxBB