Setting the tint property of Sprite if the color is an array, because it is ._normalize method is applied directly to the passed color but not the cloned one, it causes the original color to be modified causing a side effect on the application using Pixi.js
Expected Behavior
I expect that the color passed is not modified. After looking at the Color.ts file I guess that the clone intends to avoid that color is modified from outside Pixi.js once it has been set. Aligned to that intention normalize should be applied to the cloned color.
Steps to Reproduce
I posted a pixiplayground link so it is clear how to reproduce it.
Current Behavior
Setting the tint property of Sprite if the color is an array, because it is
._normalize
method is applied directly to the passed color but not the cloned one, it causes the original color to be modified causing a side effect on the application using Pixi.jsExpected Behavior
I expect that the color passed is not modified. After looking at the Color.ts file I guess that the clone intends to avoid that color is modified from outside Pixi.js once it has been set. Aligned to that intention normalize should be applied to the cloned color.
Steps to Reproduce
I posted a pixiplayground link so it is clear how to reproduce it.
https://pixiplayground.com/#/edit/xX09VNY0_G1XCeHTd5iRr
Environment
pixi.js
version: e.g. 8.1.5Possible Solution
On value setter of Color class just call the normalize method on the already cloned color.
Additional Information
No response