ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.575 by root, Thu Jun 30 16:56:41 2016 UTC vs.
Revision 1.576 by root, Thu Jun 30 16:59:02 2016 UTC

3360 r &= 0xff; 3360 r &= 0xff;
3361 g &= 0xff; 3361 g &= 0xff;
3362 b &= 0xff; 3362 b &= 0xff;
3363 3363
3364 unsigned int color = (r << 16) | (g << 8) | b; 3364 unsigned int color = (r << 16) | (g << 8) | b;
3365 unsigned int idx_r = r / (0xff / (Red_levels - 1)); 3365 unsigned int idx_r = r * (Red_levels - 1) / 0xff;
3366 unsigned int idx_g = g / (0xff / (Green_levels - 1)); 3366 unsigned int idx_g = g * (Green_levels - 1) / 0xff;
3367 unsigned int idx_b = b / (0xff / (Blue_levels - 1)); 3367 unsigned int idx_b = b * (Blue_levels - 1) / 0xff;
3368 unsigned int idx = colorcube_index (idx_r, idx_g, idx_b); 3368 unsigned int idx = colorcube_index (idx_r, idx_g, idx_b);
3369 3369
3370 if (rgb24_color[idx] == color) 3370 if (rgb24_color[idx] == color)
3371 return idx + minTermCOLOR24; 3371 return idx + minTermCOLOR24;
3372 3372

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines