Repository: ynqa/jnv (language: rust)

Issue:
Preview text too dark
The text is quite a bit too dark to be readable in "preview" mode, i.e. when tabbing through keys:

<img width="2519" alt="image" src="https://github.com/ynqa/jnv/assets/25161793/7673d5f9-b6c5-463b-b5d1-aeddd9cbb402">

I don't have any visual impairment so if I struggle it's likely impossible to read for people who don't have perfect vision.

In particular the dim blue can't be read against the black background.

It seems that your terminal shows the blue a bit differently:
![image](https://github.com/ynqa/jnv/assets/25161793/efcf4cd4-5b33-4047-a0d7-8fcbad3742c7)


Discussion / hints:

Fix patch:
diff --git a/src/jnv.rs b/src/jnv.rs
index a55956a..645838d 100644
--- a/src/jnv.rs
+++ b/src/jnv.rs
@@ -74,8 +74,8 @@ impl Jnv {
                 history: Default::default(),
                 prefix: String::from("❯❯ "),
                 mask: Default::default(),
-                prefix_style: StyleBuilder::new().fgc(Color::DarkCyan).build(),
-                active_char_style: StyleBuilder::new().bgc(Color::DarkMagenta).build(),
+                prefix_style: StyleBuilder::new().fgc(Color::Blue).build(),
+                active_char_style: StyleBuilder::new().bgc(Color::Magenta).build(),
                 inactive_char_style: StyleBuilder::new().build(),
                 edit_mode,
                 lines: Default::default(),
@@ -83,7 +83,7 @@ impl Jnv {
             hint_message_renderer: text::Renderer {
                 text: Default::default(),
                 style: StyleBuilder::new()
-                    .fgc(Color::DarkGreen)
+                    .fgc(Color::Green)
                     .attrs(Attributes::from(Attribute::Bold))
                     .build(),
             },
@@ -92,10 +92,10 @@ impl Jnv {
                 listbox: listbox::Listbox::from_iter(Vec::<String>::new()),
                 cursor: String::from("❯ "),
                 active_item_style: StyleBuilder::new()
-                    .fgc(Color::DarkGrey)
-                    .bgc(Color::DarkYellow)
+                    .fgc(Color::Grey)
+                    .bgc(Color::Yellow)
                     .build(),
-                inactive_item_style: StyleBuilder::new().fgc(Color::DarkGrey).build(),
+                inactive_item_style: StyleBuilder::new().fgc(Color::Grey).build(),
                 lines: Some(suggestion_list_length),
             },
             keymap: KeymapManager::new("default", self::keymap::default)
@@ -121,11 +121,11 @@ impl Jnv {
                     square_brackets_style: StyleBuilder::new()
                         .attrs(Attributes::from(Attribute::Bold))
                         .build(),
-                    key_style: StyleBuilder::new().fgc(Color::DarkBlue).build(),
-                    string_value_style: StyleBuilder::new().fgc(Color::DarkGreen).build(),
+                    key_style: StyleBuilder::new().fgc(Color::Cyan).build(),
+                    string_value_style: StyleBuilder::new().fgc(Color::Green).build(),
                     number_value_style: StyleBuilder::new().build(),
                     boolean_value_style: StyleBuilder::new().build(),
-                    null_value_style: StyleBuilder::new().fgc(Color::DarkGrey).build(),
+                    null_value_style: StyleBuilder::new().fgc(Color::Grey).build(),
                     active_item_attribute: Attribute::Bold,
                     inactive_item_attribute: Attribute::Dim,
                     lines: Default::default(),
@@ -207,7 +207,7 @@ impl Jnv {
                                     renderer.hint_message_snapshot.after_mut().replace(text::Renderer {
                                         text: format!("JSON query ('{}') was executed, but no results were returned.", &completed),
                                         style: StyleBuilder::new()
-                                            .fgc(Color::DarkRed)
+                                            .fgc(Color::Red)
                                             .attrs(Attributes::from(Attribute::Bold))
                                             .build(),
                                     });
@@ -228,7 +228,7 @@ impl Jnv {
                                                     &completed,
                                                 ),
                                                 style: StyleBuilder::new()
-                                                    .fgc(Color::DarkYellow)
+                                                    .fgc(Color::Yellow)
                                                     .attrs(Attributes::from(Attribute::Bold))
                                                     .build(),
                                             });
@@ -250,7 +250,7 @@ impl Jnv {
                                                 e
                                             ),
                                             style: StyleBuilder::new()
-                                                .fgc(Color::DarkRed)
+                                                .fgc(Color::Red)
                                                 .attrs(Attributes::from(Attribute::Bold))
                                                 .build(),
                                         })
@@ -266,7 +266,7 @@ impl Jnv {
                                 renderer.hint_message_snapshot.after_mut().replace(text::Renderer {
                                     text: format!("Failed to execute jq query '{}'", &completed),
                                     style: StyleBuilder::new()
-                                        .fgc(Color::DarkRed)
+                                        .fgc(Color::Red)
                                         .attrs(Attributes::from(Attribute::Bold))
                                         .build(),
                                     },


Test patch: