I have an object with the ReplaceColor effect, and I have an array with several colors in HEX in it, how do I do it?
Develop games in your browser. Powerful, performant & highly capable.
Here is a snippet from my template that converts color value from hex to r/g/b:
Local number col = 0 + System: code = "hex" -> System: Set col to Browser.ExecJS("parseInt('0x" & ColorInput.Text & "', 16);") -> System: Set col to clamp(col, 0, 16777215) -> System: Set r to int(col÷65536) -> System: Set g to (int(col÷256)%256) -> System: Set b to (col%256) -> Sprite: Set color to rgbEx255(r,g,b)