How to change material color using maskTexture in THREE.js

can I use a mask texture in three.js to change the colour of a particular section of a given material?

i got two types of texture:
texutre_1_gray.jpg which represent main texture in gray (diffuse),
and texture_color_mask which represent a color mask texture.

I would like to be able to manipulate the colour of the mask, can this be achieved in THREE.js without writing a custom shader?

Not super easily. You could do it in canvas as a preprocess to build the final single texture… via getImageData+putImageData

Or you could hack/extend one of the built in material types to support whatever crazy scheme you want via onBeforeCompile.

or… a completely custom shader. (aka hard mode)