Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Newsbeuter color08 is the same with color00 #186
Sorry, I forgot to specify the datails.
I looked at the code, and evidently using
Really, though, this makes sense because the escape sequence only really supports 0-7.
I managed to work around this by using the following line:
This results in a gray (i.e. "bold black") background.
But why can I use
And it seems that the example you gave are also not working. I hope that newsbeuter can also support true colors as most of the terminals is already supporting it. And since ncurses have no support for it, newsbeuter won't have too. https://gist.github.com/XVilka/8346728
Maybe it have the capability of displaying 256 colors. Look at https://github.com/akrennmair/newsbeuter/blob/master/src/utils.cpp#L628
Short story: when you write "color0N", that means that you're using octal number for the colour. "8" is not a valid octal numeral, so deep down in the libraries we use, "08" turns into "0"; that's why "color08" and "color00" are the same.
Long story: newsbeuter itself doesn't handle colours, it just passes them to STFL, our ncurses widgets library of choice. STFL, in turn, strips "color" prefix and then passes the remainder to
That said, I believe we should sanity-check the values we read from the config. I'm not entirely sure about the approach yet (allow decimal, octal and hexadecimal? Restrict to decimal?), but it will be done. Stay tuned.
I think this patch fails
I am not sure why you chose that decision even after I had read it my times.
If they chose
Wouldn't it be better for them to as the colors are still the same:
It seems that I found
Okay, let me explain one last time.
We used to just pass colours down to STFL. The library accepted numbers
So if someone used
#186 actually revealed a bug in STFL: it silently drops all numerals
This bug is easy to work around in Newsbeuter, so I did. But it hinted
That's easy enough to do, but there's a problem: decimals are often
That's why leading zeroes can't be ignored; Newsbeuter has to actively
It would, but:
Hope this explanation helped, and we can finally put the issue to rest.
Now that's new. Let's file a separate bug for that!