There are 2 kind of fabrics, the ballistics (solid colors) and all the others.
For the ballistics all the colorization is done on the browser using canvas. There is a grey mask that is exposure (based on an exposure curve for the color) and tint adjusted (based on the color chosen) and then composited on the canvas. All the swatches on the right side and the bag are colorized like that.
For all the other fabrics, it is a bunch of images precut and loaded on the canvas.
Here to answer any question you might have on the implementation.