shithub: neatpost

Download patch

ref: 7a81319b8ffbca4661af25814661e3d183d1bfac
parent: ca8f5b9fefb1f75b8b2960fb7b73525fa3630b7e
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sun Feb 15 11:22:46 EST 2015

clr: map colour #fff to #ffffff

--- a/clr.c
+++ b/clr.c
@@ -37,7 +37,7 @@
 	for (i = 0; i < len; i++)
 		if (strchr(digs, tolower(s[i])))
 			n = n * 16 + (strchr(digs, tolower(s[i])) - digs);
-	return len == 1 ? n << 4 : n;
+	return len == 1 ? n * 255 / 15 : n;
 }
 
 int clr_get(char *s)