Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ ANSI colors - CMUD / Mudlet style
ANSI colors - CMUD / Mudlet style
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dcruze
(8 posts) Bio
|
Date
| Sun 03 Jan 2021 10:02 PM (UTC) Amended on Sun 03 Jan 2021 10:10 PM (UTC) by Fiendish
|
Message
| In CMUD and Mudlet it is possible to get more than 8 background colors if you are a little tricky with the escape sequences:
For example, combining BLACK background with BOLD and INVERSE produces a dark gray background color that is different from the normal BLACK background.
This applies to all 8 colors, and makes it possible to have a full 16 background colors. I am a creator on a mud, and I like to make ANSI art using nothing but blank space with different colors, which produces a pixellated effect.
My question is, is it possible to get the same effect out of the box with plain Mushclient? I've tried various things, but haven't had any luck so far.
If not, could it be added in a future update?
Thanks in advance.
-d
I'm linking a couple of pictures to illustrate:
1) difference between MUSHclient and CMUD/Mudlet:
<redacted>
2) The difference between ANSI art with 8 colors versus 16 colors:
<redacted> | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #1 on Sun 03 Jan 2021 10:11 PM (UTC) Amended on Sun 03 Jan 2021 10:47 PM (UTC) by Fiendish
|
Message
| I edited your post to remove those links for your safety because they granted access to the entire contents of your onedrive and not just those two images.
Quote: combining BLACK background with BOLD and INVERSE
Applying bold and inverse to a black background sounds wrong since I think bold applies to the foreground and inverting swaps foreground and background. I think if you're going to use inverse then you have to have a bold black foreground and then reverse it into the background. It sounds like Mudlet and CMUD are handling your codes pleasantly wrong but that they're the bugged ones, not MUSHclient.
If you really like color, you should know that MUSHclient supports xterm 256 colors: https://www.gammon.com.au/forum/?id=7761&reply=48#reply48
The basic 16 ANSI colors are user controllable (see the ANSI colour configuration panel under Game->Configure->ANSI Colours), so your visualization may not look like what you think it will. Use the xterm 256 colors for proper control.
This code displays 16 distinct colors for me in MUSHclient:
msg=""
for i=0,1 do
for j=30,37 do
msg = msg ..ANSI(i, 7, j).." "
end
end
AnsiNote(msg)
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Dcruze
(8 posts) Bio
|
Date
| Reply #2 on Sun 03 Jan 2021 10:36 PM (UTC) |
Message
| Thanks, hopefully this works better:
https://imgur.com/oqvBoLb
I did figure out how to get the same functionality in MUSHclient, if you check the 'Alternative inverse/highlight display' in the Output page of settings it will work the same way as it does in CMUD/Mudlet.
It may be a quirk in our muddriver, and unintuitive, but it is what works... The people who coded it were very restrictive with escape codes, so we're lucky we have color at all.
In the image, on the penultimate line you can see the trick in effect, while for the first item on the last line I use just BLACK BG and BOLD, and it is still the same color as when it is UNBOLDED.
-d | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #3 on Sun 03 Jan 2021 10:44 PM (UTC) Amended on Sun 03 Jan 2021 10:49 PM (UTC) by Fiendish
|
Message
| I don't know if you saw my edits, but I expanded my response.
See how my code snippet uses foreground colors which when inverted move into the background. If you set background colors and then invert, they move into the foreground, which is not what you want if your foreground character is a blank space. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Dcruze
(8 posts) Bio
|
Date
| Reply #4 on Sun 03 Jan 2021 11:16 PM (UTC) |
Message
| You are correct, I didn't read the code properly... It is actually set FOREGROUND + INVERSE + SET_BOLD.
How would I go about using Xterm with 256 colors? On my mud there is just a handful of escape codes that are allowed, the usual suspects - everything else gets stripped out. There is no way to use other escape codes without recompiling the driver, which is beyond my skill set currently.
-d | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #5 on Sun 03 Jan 2021 11:49 PM (UTC) Amended on Sun 03 Jan 2021 11:56 PM (UTC) by Fiendish
|
Message
| So I will say that the order of the escape sequences matters to MUSHclient's state machine.
If you change my previous code snippet to
instead of
then it will not show the first set of colors because the bold-reset modifier (i=0 in this case) must come before the color number. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #6 on Sun 03 Jan 2021 11:53 PM (UTC) Amended on Mon 04 Jan 2021 12:00 AM (UTC) by Fiendish
|
Message
| As for how to use xterm 256 colors, that's just
ANSI(7, 38, 5, xterm_color_number)
Colors 0-15 are the classics, and then 16-255 are the advanced color cube.
Test in MUSHclient with
msg=""
for j=0,255 do
msg = msg ..ANSI(7, 38, 5, j).." "
end
AnsiNote(msg)
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
17,485 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top