rtl_433 icon indicating copy to clipboard operation
rtl_433 copied to clipboard

"time" field terminal color choice makes it hard to read

Open gvanem opened this issue 3 years ago • 3 comments

My shell (4NT from jpsoft.com) uses a blue background. So when using the -M time parameter the console looks like: RTL_433_time

invisible! So after this patch:

--- a/src/output_file.c 2022-05-16 12:21:09
+++ b/src/output_file.c 2022-06-25 15:01:07
@@ -155,7 +155,7 @@
     if (!key || !*key)
         return TERM_COLOR_RESET;
     if (!strcmp(key, "tag") || !strcmp(key, "time"))
-        return TERM_COLOR_BLUE;
+        return TERM_COLOR_BRIGHT_WHITE;
     if (!strcmp(key, "model") || !strcmp(key, "type") || !strcmp(key, "id"))
         return TERM_COLOR_RED;
     if (!strcmp(key, "mic"))

it looks OK for me:

RTL_433_time-2

I think many people have other background shell colours than plain black. I have yet to see someone with bright-white. So the above patch should be pleasing for most.

gvanem avatar Jun 25 '22 13:06 gvanem

Bright (9x codes) doesn't seem to work in my terminals. The default white isn't great on a bright background (we should consider bright and dark bg's, and also blue then).

bright_term

Maybe we need to add the bold attribute for this?

zuckschwerdt avatar Jun 25 '22 14:06 zuckschwerdt

Or a reverse;TERM_COLOR_BRIGHT_BLUE_ON_WHITE. Possible?

gvanem avatar Jun 25 '22 14:06 gvanem

I would expect there is prior art on how to deal with this (besides the curmudgeon approach of not using colors). rtl_433 doesn't seem particularly special in doing this sort of thing.

gdt avatar Jul 03 '22 19:07 gdt

I'm inclined to close this; it seems intractable and if someone wants to create a PR that adds some general approach that's fine. This could be support for multiple palettes, or a config file for colors. But I can't see us tweaking colors to fit particular people's setups, and this has been idle for a long time.

(I can also see an easy way to disable colorization. This is proof that's needed, but that's for another issue.)

gdt avatar Sep 29 '23 19:09 gdt