Skip to content
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

utf8 export - wrong colors (light gray = white) #173

Open
BlueMax opened this issue Nov 14, 2020 · 9 comments
Open

utf8 export - wrong colors (light gray = white) #173

BlueMax opened this issue Nov 14, 2020 · 9 comments

Comments

@BlueMax
Copy link

BlueMax commented Nov 14, 2020

Hi,
i think the light gray color is broken (it's actually white) when exporting as utf8. Tested on xfce and gnome terminal ('white on black' colors).
The upper line is 'cat' output from Linux shell.
The lower one is from Moebius.

lightgray

Looking at the escape codes you're using [0m (reset/remove all attributes) for light gray and [1m (Bold/Bright) for white. These are no actual color definitions indeed. It might work ok though for white but not for 'light gray' (actually it's in sync with 'white' when changing Terminal colors).

@sblendorio
Copy link

I tried #175 by exporting Utf8Ansi of this ANS file:
https://www.dropbox.com/s/w6lkqinxk4inzde/BbcNews.ans?dl=0

...but the resulting utf8ans has lost the "bright white", replaced by "light gray":
https://www.dropbox.com/s/0cp7g0wifrgceq9/BbcNews.utf8ans?dl=0

@BlueMax
Copy link
Author

BlueMax commented Dec 23, 2020

For me it looks like below. Tested on xfce4 terminal and termux (Android).
What system/terminal are you on? Maybe 'bright white' is 'light gray' on your terminal by design. Check several color profiles/settings in your terminal.
What happens without #175?

BbcNews

@sblendorio
Copy link

sblendorio commented Dec 28, 2020

On the top, the result with #175
On the bottom, the result without #175
image
It's strange because on the bottom, "sometimes" there is white and sometimes not. While on the top there is never... I use Ubuntu with its default terminal emulator.

@BlueMax
Copy link
Author

BlueMax commented Dec 28, 2020

The top one probably has a fixed (terminal) color palette with white set to gray. I have this option as well on my terminal. Only very few color palette templates are useful for ANSI art. Try to tweak the terminal or try xfce terminal.

The bottom one is broken as the current implementation without #175 doesn't define any color at all at some points. That's why it fluctuates between gray and white. If the terminal interpretation of this null color would be white the picture could be correct. But i haven't seen any terminal doing so. Maybe MacOS or some exotic system.

@sblendorio
Copy link

The strange thing is that, having white set on gray, the bottom case should never show white... or not?

@sblendorio
Copy link

I tried XFCE Terminal and it looks OK.

@BlueMax
Copy link
Author

BlueMax commented Dec 28, 2020

The strange thing is that, having white set on gray, the bottom case should never show white... or not?

Yes, i think so.
Even though there might be two 'whites'. The 'cursor foreground' (that usually is gray though) and the fixed 16 colors palette 'white'. That's how you can tweak it in xfce terminal.

It might also help to take a more complex ANSI for testing. I mostly used this to test (just cat it in shell).

@sblendorio
Copy link

Why #175 is better than #174 ?

@BlueMax
Copy link
Author

BlueMax commented Dec 28, 2020

Some colors were wrong in xfce terminal. I cannot remember the exact result anymore though.
I did change the values and compared it to the final ansi-utf8 file values with a Hex-Editor. And tested it with cat of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants