Closed danielepusceddu closed 4 years ago
After commenting out all of these lines in x.c, I'm finally getting the right color. Again, this is with alpha set to 1. I also had this problem even when alpha wasn't defined at all. I suspect that the colors are being changed because of conversion issues
/* set alpha value of bg color */
if (opt_alpha)
alpha = strtof(opt_alpha, NULL); //maybe this is not exactly 1?
dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
dc.col[defaultbg].color.red =
((unsigned short)(dc.col[defaultbg].color.red * alpha)) & 0xff00;
dc.col[defaultbg].color.green =
((unsigned short)(dc.col[defaultbg].color.green * alpha)) & 0xff00;
dc.col[defaultbg].color.blue =
((unsigned short)(dc.col[defaultbg].color.blue * alpha)) & 0xff00;
dc.col[defaultbg].pixel &= 0x00FFFFFF;
dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
I am using the gruvbox color scheme in .Xresources. The line is this:
st.background: #1d2021
But on the screen I will get color#17191a
, found with gpick. I have gruvbox installed in nvim. When I open nvim, the background color is visibly different and gpick tells me it's#1d2021
as expected. This also means that true color works fine, but somehow it's not getting it from the .Xresources. alpha is set to 1.The background is parsed fine, because if I set it to
#ffffff
and run xrdb, it will become white.