halo icon indicating copy to clipboard operation
halo copied to clipboard

Halo interfering with colorama brightness

Open o355 opened this issue 7 years ago • 12 comments

In my program, I'm attempting to use the library Colorama to use terminal colors, and to brighten up text in my program. I'm also using halo for the spinners, but the two libraries conflict when a halo spinner is added.

Colorama's colored text automatically gets dimmed, and regardless if I disable the spinner, I'd have to brighten up each print statement, and every color change.

This appears to only be occurring on Windows, and in the default command prompt. I'm thinking the issue stems from changing the terminal color on your side.

o355 avatar Oct 15 '17 01:10 o355

@o355 The only reason I can think of here is we need to call deinit in the library before exiting. But what confuses me is I'm not dimming the text anywhere in the library. Could you please share the code so that we can look into it?

manrajgrover avatar Oct 15 '17 09:10 manrajgrover

The code is in my project PyWeather on this account. It's in the pyweather.py file, and the code around line 1190 is where the issues begin to occur.

o355 avatar Oct 15 '17 15:10 o355

@o355 I've gone through your code and from the looks of it, it is quite possible you are not ending your colored text with Fore.RESET. I've also tried producing this error on my machine, but nothing failed.

I would need external help as I don't have access to Windows machine to particularly look into this problem and to reproduce this issue as of now.

I would appreciate if you could also share screenshots here for further investigation along with following details:

  • Operating System:
  • Terminal in use:
  • Python version:
  • Halo version:
  • pip freeze output:

manrajgrover avatar Oct 20 '17 19:10 manrajgrover

Alright. I can tell you off the top of my head that I'm using Windows 10, and the issue occurs in PowerShell/Command Prompt. Python version is 3.6.2.

I'll get the halo version and pip freeze outout when I can.

o355 avatar Oct 21 '17 00:10 o355

Here's the pip freeze output:

appJar==0.70
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
colorama==0.3.9
cursor==1.1.0
decorator==4.1.2
enum34==1.1.6
geopy==1.11.0
halo==0.0.6
idna==2.6
log-symbols==0.0.11
ratelim==0.1.6
requests==2.18.4
six==1.11.0
spinners==0.0.19
termcolor==1.1.0
urllib3==1.22

Halo version is 0.0.6 as seen above. I don't end my colored texts with Fore.RESET so I don't have an additional half a thousand Fore.RESET lines.

o355 avatar Oct 23 '17 14:10 o355

@o355 I tested your code on my Windows machine and didn't find any problem. Colorama and halo are working well together. Isn't any screenshots you expected and actually got? If you can, I hope you provide us minimal code we can test. 😄

winterjung avatar Oct 23 '17 16:10 winterjung

Hmm...interesting. Here's a screenshot of what I'm getting: screenshot 16

I've been pretty busy lately, but I'll find some time to upload some minimal code that's based off the issues I'm getting. I also updated halo to 0.0.7 and the issue is persisting for my code.

o355 avatar Oct 23 '17 21:10 o355

I did a little investigating, and it looks to only be the brightness of the color that doesn't carry over from line to line, maybe even color to color.

o355 avatar Oct 23 '17 21:10 o355

I can confirm this for Ubuntu Xenial

BenjaminUrquhart avatar Oct 25 '17 16:10 BenjaminUrquhart

@o355 Is this resolved now?

manrajgrover avatar Jan 12 '18 07:01 manrajgrover

@ManrajGrover Can't confirm it's resolved as in my script I have the line to line brightness stuff. I'll have to write a quick script and I'll confirm if this is resolved.

o355 avatar Jan 12 '18 17:01 o355

Was this issue ever fixed? Seems that this issue is still occurring and also preventing the colour to activate.

KhushC-03 avatar Apr 10 '23 01:04 KhushC-03