How can I manipulate textures and materials with HtmlDialog?
You don’t use the HtmlDialog itself to manipulate textures. It only display the UI.
Manipulation of the model and textures must be done with Ruby. So you need to wire up action callbacks from the webdialog to tell Ruby to perform the manipulation.
As with SketchUp 2018 you can use Sketchup::ImageRep to manipulate textures on pixel level.
That being said, you mention colorization - which SketchUp support without you having to perform the pixel manipulation yourself. For that you use the Sketchup::Material class.
It’s a little unclear exactly what you are looking to do - so I cannot recommend which direction to do. If you can elaborate more in what and - why then we can assist further.