Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Development
➜ 24-bit ANSI Color Implementation
24-bit ANSI Color Implementation
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Mirai
(4 posts) Bio
|
Date
| Sat 24 Nov 2018 09:18 PM (UTC) |
Message
| I haven't submitted a PR for it yet but was wondering if this is something that would be merged into the distribution (before I go and clean up my commit..)
The reference is here: https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit
"[38;2;r;g;b" vs the supported "[38;5;code"
I have foreground colors working and am putting in the background colors next.
The diff for support is ~71 lines without bkg support.
What do you think?
Thanks! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 25 Nov 2018 04:06 AM (UTC) |
Message
| Would your intention here be to just support the syntax, or are you aiming for 24-bits for each of the colours? (R/G/B).
The internal implementation of colours is to store them in a long (ie. 8 bits for each of R/G/B) and it would take a major change to support more than 255 for any of those colours.
If the colours were constrained to 0 to 255 for each of R/G/B then I don't see a major issue. If not, then I do. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #2 on Sun 25 Nov 2018 07:59 PM (UTC) Amended on Sun 25 Nov 2018 08:04 PM (UTC) by Fiendish
|
Message
|
Quote: If the colours were constrained to 0 to 255 for each of R/G/B then I don't see a major issue.
This fits my understanding of 24 bit color.
Are there servers using this other notation, though? If so, why? My eyes can only barely differentiate neighboring shades on the 256 color chart. Subdividing the text colorspace further by a factor of over 65000 seems absurd to me. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Mirai
(4 posts) Bio
|
Date
| Reply #3 on Mon 26 Nov 2018 11:24 PM (UTC) |
Message
| Thank you for your reply.
Yes, I just adding support for that syntax, preventing the escape code "ESC[38;2;201;192;0m" from rendering as "201;192;0m", and enabling the display of the text in the appropriate RGB color.
Correct, it'd be 8 bits per channel, 24-bits for the whole color (i.e. one byte per r/g/b, 0-255). Only RGB colorspace, not HSV/CMYK allowed by I.TEC. It works (tested) with the given COLORREF data structure/size. My branch will be ready soon.
Fiendish said:
Are there servers using this other notation, though? If so, why? My eyes can only barely differentiate neighboring shades on the 256 color chart.
I actually implemented this specifically for an in-development server, where the author seems to be doing so with good creative effect. Maps with subtle color variations, visual effects like a flickering flame. Currently they are having their users use beipmu but I prefer MUSHclient and implemented so that I could use it for this game.
I believe 8bitMUSH only uses 256-color mode. I assume there are some or more, though perhaps it'll open the door for more given expanded client support. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #4 on Mon 26 Nov 2018 11:38 PM (UTC) |
Message
| Internally MUSHclient supports 24-bit colour. There are a few colour modes, one is indexed (ie. if it gets the code for ANSI green it looks that up in a table, which you can configure, so it doesn't necessarily look green).
Another mode is RGB colour where the colour is stored in a long (8 bits each for R/G/B). This was partly done to support MXP. Also functions like ColourNote (can) take a 24-bit colour as an argument.
The changes should be fairly straightforward. I expect most or all of them to be in:
https://github.com/nickgammon/mushclient/blob/master/ansi.cpp |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mirai
(4 posts) Bio
|
Date
| Reply #5 on Tue 27 Nov 2018 04:33 AM (UTC) |
Message
| |
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #6 on Wed 28 Nov 2018 03:47 AM (UTC) |
Message
|
Quote: I actually implemented this specifically for an in-development server, where the author seems to be doing so with good creative effect. Maps with subtle color variations, visual effects like a flickering flame.
I'd love to see this. Got a link? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Sunkeneyes
(8 posts) Bio
|
Date
| Reply #7 on Wed 28 Nov 2018 03:51 PM (UTC) |
Message
|
Fiendish said:
Quote: I actually implemented this specifically for an in-development server, where the author seems to be doing so with good creative effect. Maps with subtle color variations, visual effects like a flickering flame.
I'd love to see this. Got a link?
hi, i'm the developer of the mentioned project. if you use discord you can add me (Janey#0136) and i can send screenshots and more information. for various reasons i don't want to post any links out in the open. | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #8 on Wed 28 Nov 2018 04:20 PM (UTC) |
Message
|
Quote: if you use discord
I don't.
Quote: for various reasons i don't want to post any links out in the open.
??? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Sunkeneyes
(8 posts) Bio
|
Date
| Reply #9 on Wed 28 Nov 2018 04:37 PM (UTC) |
Message
|
Fiendish said:
Quote: if you use discord
I don't.
Quote: for various reasons i don't want to post any links out in the open.
???
i'm secretive when it comes to the project for various reasons but in that case i'll just post the pictures here; anyone who recognizes it is already in
https://i.gyazo.com/d19087cbb6b6c6f07cf446e68dad8155.png
https://i.gyazo.com/caa5363b5922f34326e62e60bd039e7a.png
https://i.gyazo.com/bc280a353526c231e0a59e62eb014012.png | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #10 on Wed 28 Nov 2018 10:34 PM (UTC) Amended on Wed 28 Nov 2018 10:35 PM (UTC) by Fiendish
|
Message
| Does this really benefit from having 16 million very close together colors, or do you just prefer the format vs the 256 color index? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Sunkeneyes
(8 posts) Bio
|
Date
| Reply #11 on Thu 29 Nov 2018 (UTC) |
Message
|
Fiendish said:
Does this really benefit from having 16 million very close together colors, or do you just prefer the format vs the 256 color index?
it does benefit. many times i've tried to look for a specific color and instead i could only find 8 bit stuff. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #12 on Thu 29 Nov 2018 05:32 AM (UTC) Amended on Thu 29 Nov 2018 05:33 AM (UTC) by Nick Gammon
|
Message
| |
Posted by
| Sunkeneyes
(8 posts) Bio
|
Date
| Reply #13 on Thu 29 Nov 2018 07:49 PM (UTC) |
Message
|
https://i.gyazo.com/f6650f6af985b012d59dc0bff7beb983.png | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #14 on Thu 29 Nov 2018 09:39 PM (UTC) |
Message
| I've merged that commit in, with a few amendments, thanks for doing it. :)
The recompiled version should be available for download as described here: http://www.gammon.com.au/forum/?id=13903 |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
49,253 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top