-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
24 bits ANSI codes are wrongly converted instead of being stripped #217
Comments
colorama/colorama/ansitowin32.py Lines 224 to 225 in d7a5382
Need limit this params tuple lenght to 2, just like below: if command == 'm':
- for param in params:
+ for param in params[:2]: Or ignore whole params which the first param not included in AnsiCodes. |
@Delgan you are correct, it should be stripped. |
Encounter this issue today when using tqdm (tqdm/tqdm#678). Any progress to the fix? I see that @Delgan makes a Pull Request and awaits merge. Could anyone with the merge right kindly do the favour please? It would be highly appreciated. 🙈 |
how can i use this with tqdm? |
Hi.
Some terminals support 24-bit ANSI colors (aka "true colors") in the form
ESC[ 38;2;<r>;<g>;<b>
.This code:
Result on Windows:
Result on a true colors terminal:
I guess there may be an issue within the
colorama
regex in charge of parsing color codes. On Windows, this should be stripped, right?The text was updated successfully, but these errors were encountered: