moebius
moebius copied to clipboard
utf8 export - wrong colors (light gray = white)
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.
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).
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
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?
On the top, the result with #175
On the bottom, the result without #175
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.
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.
The strange thing is that, having white set on gray, the bottom case should never show white... or not?
I tried XFCE Terminal and it looks OK.
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).
Why #175 is better than #174 ?
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.