-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support white background terminals #24
Comments
Currently wego uses many of the 256 ANSI colors to „encode“ the temperature and windspeed values as well as a few shades of grey (pun intended) for different cloud coverages. A b/w only switch is already planned. It may be useful to provide another mode which only uses the first 16 colors of ANSI, which are mostly guaranteed to work with every (sane) colorscheme. These color may be arbitrary though so the colorcoding would be restricted in red, yellow/brown and green. Does anyone have any further ideas? I am using the solarized colorscheme, which works very well (see the screenshot in the README). |
I think a b/w switch would satisfy the majority of users. Another option might be to take the background colour as an argument, then use the ANSI color table to determine a minimum delta for conflicts -- if a colour used in wego is within the delta (too close to the background colour provided), select another colour outside the delta. Might be over-engineering for the problem. |
You should also avoid using hardcoded escape sequences for coloring, since not every terminal uses |
If nobody is working on this, I have something that might be useful. |
What's your plan @pallavagarwal07? |
Since all color codes are hard-coded, it would be difficult to change all of them, not to mention that dark colors for sun and such won't look so perfect. I was thinking that the switch could merely change the background of the printed lines (i have already done sample changes to the code, and will post the screenshot in a minute) |
The top para hasn't been fixed yet, but the rest looks good |
I don't like inverting the brightness of the user-defined background. I have a dark background and to not get Eye-cancer all the time, I installed a custom dark css in my browser too. However defining some kind of customizable colorscheme could work. |
In the current code, that would effectively be rewriting the whole source. Everything is hard coded - especially the slicing of strings is causing trouble |
Sorry, but it's not the proper fix. I know that everything is hardcoded atm and that it's a mess and I am sure, it will be some pito to fix it up, but it is necessary and inevitable for the project to move forwards. #1 is a strong first step in cleaning up and I hesitate to fix #7 or merge #16, since I think it will make #1 harder and after #1 is done, they should be easier to fix. |
Ok. Anyway is there anything I can do to help (for any issues, not just the current)? |
As I said, #1 is the next big thing. If you want, you can give it a try. I will post some thoughts and plans for it in the respective issue now. |
Ok |
How about supporting Solarized colors. The colors are readable with light and dark backgrounds? The only change between light and dark Solarized is the color of the background and does not change any other color. |
As you can see in the screenshots, I am actually using the dark solarized color scheme. However for the colors in wego I mostly use the ones from the colorcube, which is not (and should not be) changed by dark/light versions of solarized or any other color scheme at all. They are hard defined, which exact color they represent and that is, what I rely on. Having purple clouds or a green sun if I use another colorscheme would be strange at least. Therefore I cannot use the first 16 colors, which should be the only ones affected by color scheme selection. |
Is this still being worked on? |
Well it's not high priority for me, but if anyone would come up with an elegant b/w solution (basically removing all the color codes), I'd be happy to merge it. |
Thanks to @mattn adding it to go-colorable this is now supported with the new flag |
While this makes it usable in a light terminal I think that most would prefer a coloured theme more suitable for the "light background & dark foreground"-type terminal themes as an option. Or should that be tracked in a new issue? |
I don't think this could be made to look nice. The runes used are mostly filigree and there would be very low contrast between the bright background and the colors |
@pallavagarwal07 I had the same idea as you but I simply wrapped
As @lucaswerkmeister mentioned there is probably a more portable way to write this using |
Please make support for terminals with with white background ;)
The text was updated successfully, but these errors were encountered: