Skip to content

Commit 7a81319

Browse files
committed
clr: map colour #fff to #ffffff
1 parent ca8f5b9 commit 7a81319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int clrcomp(char *s, int len)
3737
for (i = 0; i < len; i++)
3838
if (strchr(digs, tolower(s[i])))
3939
n = n * 16 + (strchr(digs, tolower(s[i])) - digs);
40-
return len == 1 ? n << 4 : n;
40+
return len == 1 ? n * 255 / 15 : n;
4141
}
4242

4343
int clr_get(char *s)

0 commit comments

Comments
 (0)