LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.63k stars 194 forks source link

Bar not rendering colors #85

Closed michaeljoelphillips closed 10 years ago

michaeljoelphillips commented 10 years ago

Greetings,

I'm having an issue with Bar rendering colors. I was using an old version of Bar before (probably from back in June) and needed to update for another bug that was patched. After compiling the new version (no compiler errors), I am unable to drop Bar onto my new machine as a replacement with my old configuration.

The following produces a single instance of Bar with a black background:

nomad@leena ~/src/bar $ ./bar -B "#00ff00"

Regardless of color as a hex value, Bar only renders with a black background. However, if I use a color name, such as red, Bar will render with the correct color.

nomad@leena ~/src/bar $ ./bar -B "red"

It's also worth noting that I do not have a compositor on my machine, and I have tried to set the alpha with the color as well. I've also noticed that with my current Bar configuration, no text is rendered on top of the black background. My text should be visible on top of the background, but nothing gets drawn.

I'm willing to provide any information to help solve the issue. Thanks in advance!

kevinvdburgt commented 10 years ago

You forgot the alpha channel (argb), try this:

Red bar: bar -B '#ffff00' Green bar: bar -B '#ff00ff00'

LemonBoy commented 10 years ago

Maybe I should consider alpha zero as 255 to avoid problems in the future

michaeljoelphillips commented 10 years ago

Alright, so that was it. Sorry to bother you for such a trivial issue. Many thanks.

kevinvdburgt commented 10 years ago

@LemonBoy: So if the user gives only a RGB value the A value should be 255 by default then?

LemonBoy commented 10 years ago

Yes, it might be a problem as #00rrggbb and #ffrrggbb would represent the same value