diff --git a/color.c b/color.c index 7046ab3a..c8f692f9 100644 --- a/color.c +++ b/color.c @@ -24,7 +24,7 @@ #include "structs.h" #include -#define RGB_8TO16(i) (65536 * ((i) & 0xff) / 255) +#define RGB_8TO16(i) (0xffff * ((i) & 0xff) / 0xff) /** Parse an hexadecimal color string to its component. * \param colstr The color string.