how to read .vti files created from stack of 2d PNG Images and render it in vtk.js

Can you share your Python code (for the color setup) and the JS in case you try to do it as well?
Because you will have to do the same thing in JS (with maybe some small tweaks).
Also a screenshot of the JS rendering would help understand what you missed.