You are not logged in.
Pages: 1
Topic closed
The xdefaults part for urxvt color has always confused me. Using rgba, I would assume it to have 3 digits like rrr/ggg/bbb/aaa not four. So where does the fourth come from? I'm trying to make a light brown and guessing isn't getting me must past normal brown. An example:
urxvt.background: rgba:7860/6830/5600/eeee
urxvt.foreground: rgba:3860/3030/2500/ffff
Offline
You could always use hex, 2 digits per color like:
URxvt*background: #000000
URxvt*foreground: #b2b2b2
Offline
I've done that in the past, but that takes out the alpha channel and I prefer a smidge of transparency.
Offline
While I'd still like to know, I just did it the way above and gave compiz a rule for it.
Offline
This very question has plagued me for some months now. I've played with a number of variations and I can't figure out how to take a hex value and convert it to urxvt's rgba format. If anyone could post some insight I would be eternally grateful.
thayer williams ~ cinderwick.ca
Offline
I might be misunderstanding you thayer, but this works for me:
URxvt*background: [50]#000000
For a half-transparent black background. I know it's not the r/g/b/a format, but it works.
Offline
I took a quick look at the source and urxvt (and Xft) use the low-level XRenderColor struct from X11 to specify colors, which has four digits per channel (each an unsigned short).
This is, as I understand it, the 48-bit RGB color model (16 bits per channel) which makes 48, plus of course the alpha channel for a total of the 64-bit rgba.
But I'm not much of an expert in this field.
Offline
Thanks BC, that is helpful too, but what I'd like to know is how to take a hex colour, say #817859 and convert that to rgba format of 0000/0000/0000/ffff.
thayer williams ~ cinderwick.ca
Offline
Thanks BC, that is helpful too, but what I'd like to know is how to take a hex colour, say #817859 and convert that to rgba format of 0000/0000/0000/ffff.
You just add zeroes and don't use the alpha channel: rgba:8100/7800/5900/ffff
Offline
Sorry to revive such an old thread, but I'm having problems figuring rgba out as well.
I want to create a slightly transparent light background with urxvt and .Xdefault using rgba, but it is really hard to find some proper documentation on this subject. Anyone knows how and can explain it to me?
I'm currently using: rgba:ff00/ff00/ff00/ff00
Which gives me a solid white background.
Last edited by Ashren (2009-06-11 11:52:27)
Offline
Depends on what color bit depth you set (24 or 32). why use the color's rgba and not urxvt's own shading capabilities? (you'll get fake transparencies though...)
URxvt.transparent: true
URxvt.shading: 50
URxvt.inheritPixmap: true
Should be enough for a 50% semi-opaque urxvt (fake transparency)
MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Offline
I have no specific reason for using real transparency, since I'm not moving windows around. Basically I just wanted to figure out how rgba works.
To get a light (white) background with transparency I'm currently using "rgba:00ff/00ff/00ff/ff00 which works, but I don't know how to grade it properly. I understand that the four channels listed stands for red,green,blue and alpha. The alpha channel is what makes things transparent, but I don't really get why there are four digits in each channel.
Offline
I know I'm replying to a very, very old post, but I was also looking for an answer. Like @semdornus stated, you just take the hex value and add two zeros. Same applies for the alpha channel. If you want 50% transparency, it is 128 as decimal, and 0x80 as hex. So the value would be 8000. Usually the hex values are specified as #AARRGGBB. To convert it to the rgba format, it will be RR00/GG00/BB00/AA00. I don't know the reason for it, but that's what I found when I tested it.
Offline
Please don't do that, while you at least had a topical contribution I really hope they aren't looking for an answer 13 years later.
https://wiki.archlinux.org/title/Genera … bumping%22
Closing.
Offline
Pages: 1
Topic closed