Coerce any input into a valid 24-bit RGB integer (0x000000..0xffffff).
Non-finite or non-numeric values fall back to 0. Negative or out-of-range
numbers are masked into 24 bits — 0xfffffff (a 7-digit hex typo) becomes
0xffffff (white) instead of throwing in pixi 7+'s color validator.
Pure: no side effects, no prototype patching. Use this at any boundary that
passes a raw number to PIXI Graphics / tint APIs.
Coerce any input into a valid 24-bit RGB integer (
0x000000..0xffffff).Non-finite or non-numeric values fall back to
0. Negative or out-of-range numbers are masked into 24 bits —0xfffffff(a 7-digit hex typo) becomes0xffffff(white) instead of throwing in pixi 7+'s color validator.Pure: no side effects, no prototype patching. Use this at any boundary that passes a raw number to PIXI Graphics / tint APIs.