Fixing a bug with tint RGB rounding; it was previously not working at all.
This commit is contained in:
parent
ea52c488b0
commit
7f3df3d8ce
1 changed files with 3 additions and 3 deletions
|
@ -171,9 +171,9 @@ PIXI.CanvasTinter.roundColor = function(color)
|
||||||
|
|
||||||
var rgbValues = PIXI.hex2rgb(color);
|
var rgbValues = PIXI.hex2rgb(color);
|
||||||
|
|
||||||
rgbValues[0] = Math.round(rgbValues[0] * step) / step;
|
rgbValues[0] = Math.min(255, Math.round(rgbValues[0] / step) * step);
|
||||||
rgbValues[1] = Math.round(rgbValues[1] * step) / step;
|
rgbValues[1] = Math.min(255, Math.round(rgbValues[1] / step) * step);
|
||||||
rgbValues[2] = Math.round(rgbValues[2] * step) / step;
|
rgbValues[2] = Math.min(255, Math.round(rgbValues[2] / step) * step);
|
||||||
|
|
||||||
return PIXI.rgb2hex(rgbValues);
|
return PIXI.rgb2hex(rgbValues);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue