Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
internals.fade = function (color, pos, size) {
var rgb = [(color & (255 << 16)) >> 16, (color & (255 << 8)) >> 8, color & 255];
var hsv = ColorConvert.rgb2hsv(rgb);
hsv[2] -= Math.floor(hsv[2] / size * pos);
rgb = ColorConvert.hsv2rgb(hsv);
return (rgb[0] << 16) + (rgb[1] << 8) + rgb[2];
};