Skip to content

Commit

Permalink
Allow overriding colors in the 256 color space
Browse files Browse the repository at this point in the history
  • Loading branch information
bentitmus authored and neeasade committed Jan 15, 2022
1 parent 955658d commit d439927
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,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]) { /* 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 );
Expand Down

0 comments on commit d439927

Please sign in to comment.