[hackers] [st][PATCH] Allow colors 16-255 to be customized in config.h

From: Luis Ressel <aranea_AT_aixah.de>
Date: Tue, 26 Sep 2017 14:31:44 +0200

An unusal thing that only few people will need? Probably. But it's
useful to me, and since the patch is trivial, I thought I'd share it.
---
 x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x.c b/x.c
index 191e5dc..40f9ce2 100644
--- a/x.c
+++ b/x.c
_AT_@ -579,7 +579,7 @@ xloadcolor(int i, const char *name, Color *ncolor)
 	XRenderColor color = { .alpha = 0xffff };
 
 	if (!name) {
-		if (BETWEEN(i, 16, 255)) { /* 256 color */
+		if (BETWEEN(i, 16, 255) && colorname[i] == NULL) { /* 256 color */
 			if (i < 6*6*6+16) { /* same colors as xterm */
 				color.red   = sixd_to_16bit( ((i-16)/36)%6 );
 				color.green = sixd_to_16bit( ((i-16)/6) %6 );
-- 
2.14.1
Received on Tue Sep 26 2017 - 14:31:44 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 26 2017 - 14:36:48 CEST