Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors for light background #137

Open
mowgli opened this issue Apr 9, 2022 · 5 comments
Open

Colors for light background #137

mowgli opened this issue Apr 9, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@mowgli
Copy link

mowgli commented Apr 9, 2022

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…

@facundoolano
Copy link
Owner

Thanks, can you point me to what part of the output was difficult to see in light background? Or show me what you patched?

@mowgli
Copy link
Author

mowgli commented Apr 9, 2022

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

@facundoolano
Copy link
Owner

Ok, if that's the only one there's probably a "default" color I can use instead of hardcoding to black or white.

@mowgli
Copy link
Author

mowgli commented Apr 9, 2022

Its the only one I found.

@facundoolano facundoolano added the bug Something isn't working label Apr 9, 2022
@hymie0
Copy link

hymie0 commented Jun 14, 2022

I just battled a spider, and the yellow text was unreadable on my white background. I hope this file upload works.

2022-06-14_12-34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants