diff --git a/render/color.c b/render/color.c index b9bafe32..ca1f6e89 100644 --- a/render/color.c +++ b/render/color.c @@ -234,9 +234,7 @@ void increase_depth(pixel32 *data, XImage *im) g = (pseudo_colors[ii].green - icolor.green) & 0xff; b = (pseudo_colors[ii].blue - icolor.blue) & 0xff; /* find a weighted absolute deviation */ - dev = (r * r) * (0xff - (icolor.red & 0xff)) + - (g * g) * (0xff - (icolor.green & 0xff)) + - (b * b) * (0xff - (icolor.blue & 0xff)); + dev = (r * r) + (g * g) + (b * b); if (dev < closest) { closest = dev; diff --git a/render/render.c b/render/render.c index 9b721db3..f8920c25 100644 --- a/render/render.c +++ b/render/render.c @@ -167,9 +167,7 @@ void pseudocolor_startup(void) g = (pseudo_colors[i].green - icolors[ii].green) & 0xff; b = (pseudo_colors[i].blue - icolors[ii].blue) & 0xff; /* find a weighted absolute deviation */ - dev = (r * r) * (0xff - (icolors[ii].red & 0xff)) + - (g * g) * (0xff - (icolors[ii].green & 0xff)) + - (b * b) * (0xff - (icolors[ii].blue & 0xff)); + dev = (r * r) + (g * g) + (b * b); if (dev < closest) { closest = dev;