- Fixed: The intensity scalar for building DesaturateColormaps was off by one.

SVN r2380 (trunk)
This commit is contained in:
Randy Heit 2010-06-18 04:10:05 +00:00
parent 141cf825cf
commit e379d24388

View file

@ -483,12 +483,12 @@ void InitPalette ()
{
int intensity = (GPalette.BaseColors[c].r * 77 +
GPalette.BaseColors[c].g * 143 +
GPalette.BaseColors[c].b * 37) / 255;
GPalette.BaseColors[c].b * 37) / 256;
int r = (GPalette.BaseColors[c].r * (31-m) + intensity *m) / 31;
int g = (GPalette.BaseColors[c].g * (31-m) + intensity *m) / 31;
int b = (GPalette.BaseColors[c].b * (31-m) + intensity *m) / 31;
shade[c] = ColorMatcher.Pick (r, g, b);
shade[c] = ColorMatcher.Pick(r, g, b);
}
}