Hi,
Thanks for the great app. I use the CoolTerm for some time and so far, this is the best terminal app ever. It has almost all the features I need.
The only thing I miss is support for terminal text coloring.
I've found the option to filter ANSI escape sequences (and this is very useful) but I cannot find any option to apply the ANSI color codes to the terminal text.
In my use case, I have a device that continuously sends many log stings to the serial port. It uses ANSI color codes to mark info, warnings and errors in different colors. This would be much easier to notice some strange behavior within a "wall of text" when they are marked in a different color.
Do you consider adding such functionality to your application?
CoolTerm ANSI color codes support
- roger
- Site Admin
- Posts: 434
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm ANSI color codes support
Hi,
thanks for the kudos.
unfortunately, the TextArea control CoolTerm uses to display plain text is not capable of multiple text formatting. I.e. any color setting applies to all the text in the control. Being able to display portions of text in a different color would require the development of a custom text display control, which is not going to happen for the foreseeable future.
Roger
thanks for the kudos.
unfortunately, the TextArea control CoolTerm uses to display plain text is not capable of multiple text formatting. I.e. any color setting applies to all the text in the control. Being able to display portions of text in a different color would require the development of a custom text display control, which is not going to happen for the foreseeable future.
Roger
- roger
- Site Admin
- Posts: 434
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm ANSI color codes support
After looking into this a bit further, I think it MAY be possible to support a VERY LIMITED set of ANSI color and formatting for sections of text. The control can potentially support, bold, italic, underline formatting as well as limited color support (i.e. the basic colors) per this list. So, basically, ANSI sequences formatted like this:
where the codes vary from 0 to 39.
Can you post an example of text you receive from your device, including the ANSI codes it includes?
Code: Select all
ESC[1;34;{...}m
Can you post an example of text you receive from your device, including the ANSI codes it includes?
-
- Posts: 1
- Joined: Mon Apr 24, 2023 9:56 am
Re: CoolTerm ANSI color codes support
Not OP, though I would also appreciate ANSI color support!
Here's an example of a text received, where faults (0x0 or 0x41) are color coded green or yellow.
not captured in the log file is the escape codes. What is actually being received is and . (setting a color, the text, then a reset)
In my application I also have control in how the sending device format's its messages, so I could change the sent serial data to better conform to what CoolTerm would need if required.
Here's an example of a text received, where faults (0x0 or 0x41) are color coded green or yellow.
Code: Select all
Channel TC Temp Cold Junc Temp TC Faults
1 24.98C 25.45C [92m0x0[0m
2 1372.05C 25.59C [93m0x41[0m
3 1372.05C 25.59C [93m0x41[0m
4 25.27C 25.55C [92m0x0[0m
Code: Select all
"\033[92m0x0\033[0m"
Code: Select all
"\033[93m0x41\033[0m"
In my application I also have control in how the sending device format's its messages, so I could change the sent serial data to better conform to what CoolTerm would need if required.
- roger
- Site Admin
- Posts: 434
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm ANSI color codes support
I got something working by switching the textArea control used to display text to StyledText mode and using some other hacks to parse the receive data so that it the whole thing is not excruciatingly slow. It works ok, and it can handle all the color modes and a few formatting sequences (bold, italic, underline), but it won't be as snappy as when you just tell CoolTerm to filter out all ANSI escape sequences. I will send you an e-mail at the address you provided when you registered the forum account with the link to a build you can try out.bltsndwch wrote: ↑Mon Apr 24, 2023 10:22 am Not OP, though I would also appreciate ANSI color support!
Here's an example of a text received, where faults (0x0 or 0x41) are color coded green or yellow.not captured in the log file is the escape codes. What is actually being received isCode: Select all
Channel TC Temp Cold Junc Temp TC Faults 1 24.98C 25.45C [92m0x0[0m 2 1372.05C 25.59C [93m0x41[0m 3 1372.05C 25.59C [93m0x41[0m 4 25.27C 25.55C [92m0x0[0m
andCode: Select all
"\033[92m0x0\033[0m"
. (setting a color, the text, then a reset)Code: Select all
"\033[93m0x41\033[0m"
In my application I also have control in how the sending device format's its messages, so I could change the sent serial data to better conform to what CoolTerm would need if required.
Roger
-
- Posts: 1
- Joined: Mon Jan 22, 2024 11:35 pm
Re: CoolTerm ANSI color codes support
Hello,
i have fond of CoolTerm for quite some time and have been looking for a solution for ANSI style encoding support, if you have worked out a solution to this than please share it so i can see the rainbow in CoolTerm.
i have fond of CoolTerm for quite some time and have been looking for a solution for ANSI style encoding support, if you have worked out a solution to this than please share it so i can see the rainbow in CoolTerm.
- roger
- Site Admin
- Posts: 434
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: CoolTerm ANSI color codes support
Hi,farhan ahmed wrote: ↑Mon Jan 22, 2024 11:39 pm Hello,
i have fond of CoolTerm for quite some time and have been looking for a solution for ANSI style encoding support, if you have worked out a solution to this than please share it so i can see the rainbow in CoolTerm.
the latest version (v2.1.0) supports this now. You can download it here: https://freeware.the-meiers.org