tgb20 / Dimo-OSS

Open source assets that make up the Dimo Pterodactyl app.
MIT License
0 stars 0 forks source link

Colors from xterm.js do not match colors in app #1

Open tgb20 opened 1 year ago

tgb20 commented 1 year ago

Originally reported over Discord from powercas_gamer.

cUXf6Kq IMG_5244

tgb20 commented 1 year ago

I can't recreate it: CleanShot_2023-06-30_at_17 24 21

powercasgamer commented 1 year ago

Using this code in a Paper plugin

        getComponentLogger().error(
                MiniMessage.miniMessage().deserialize("<red>This is red</red> " +
                        "<red>This is also red!</red> " +
                        "<green>This is green</green> " +
                        "<white>And this is white</white>"
                ));
        getComponentLogger().info(
                MiniMessage.miniMessage().deserialize("<red>This is red</red> " +
                        "<red>This is also red!</red> " +
                        "<green>This is green</green> " +
                        "<white>And this is white</white>"
                ));
        getComponentLogger().warn(
                MiniMessage.miniMessage().deserialize("<red>This is red</red> " +
                        "<red>This is also red!</red> " +
                        "<green>This is green</green> " +
                        "<white>And this is white</white>"
                ));

I get this on the web panel: image

And this on IOS: image

/plugins shows it fine in green: image

Another screenshot: ios: image

web: image

tgb20 commented 1 year ago

I wrote my own plugin to recreate your messages. What is interesting is that the problem only occurs when using ANSIComponentSerializer. If the messages are sent as chat messages they render fine. This also lines up with the INFO tagged message as it doesn't get any special formatting.

I also noticed that on the web console the bold tag carries over to the message for ERROR and warning.

Web image

App image

Actual ANSI being received by the console:

[00:50:01 ERROR]: This is red This is also red! This is green And this is white
[00:50:01 INFO]: This is red This is also red! This is green And this is white
[00:50:01 WARN]: This is red This is also red! This is green And this is white

I think this is an issue with the Swift xterm implementation so I am going to file an issue there. This seems the most likely as xterm.js seems to compensate for it somehow.

tgb20 commented 1 year ago

This was fixed upstream. It will be included in a future release.