rpg-cli
rpg-cli copied to clipboard
Colors for light background
I usually have a light background which makes white color not visible.
For now I patched that in the source but it would be nice to make colors aware of light or dark background or/and configure colors with config files.
It might also be nice to get environment CLICOLOR_FORCE documented if using pipes…
Thanks, can you point me to what part of the output was difficult to see in light background? Or show me what you patched?
From b11b5e261309c06a161a5754ec768c4277635697 Mon Sep 17 00:00:00 2001
From: Klaus Ethgen <[email protected]>
Date: Sat, 9 Apr 2022 11:54:20 +0100
Subject: [PATCH] Use light background
---
src/log.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/log.rs b/src/log.rs
index dd6b368..e90837c 100644
--- a/src/log.rs
+++ b/src/log.rs
@@ -423,7 +423,7 @@ fn format_hp_change(receiver: &Character, amount: i32, suffix: &str) -> String {
"green"
}
} else {
- "white"
+ "black"
};
format!("{:+}hp {}", amount, suffix)
.color(color)
--
2.35.1
Ok, if that's the only one there's probably a "default" color I can use instead of hardcoding to black or white.
Its the only one I found.
I just battled a spider, and the yellow text was unreadable on my white background. I hope this file upload works.