Change color in RIVE
I'm looking to dynamically change the color of an object in my Rive file directly through my JavaScript code. Does anyone know if this is possible?
My javascript:
`const r = new rive.Rive({ src: "email6.riv", canvas: document.getElementById("canvas"), autoplay: true, artboard: "New Artboard", stateMachines: "email_hover",
onLoad: () => { r.resizeDrawingSurfaceToCanvas(); }, }); `
its been a long time since i've used Rive, but i think you can attach the colour of an object to some state and changing it using javascript would result in change in colour
Yes, but I was considering whether it's possible to dynamically change to any HEX code within the code not depending in the RIVE file?