Color Mask Shader

I am trying to find a way to make a shader that takes in two textures and one color.
The first texture is the main texture that holds the detail.
The second texture is the mask which will over lap the first.

I wanted to use the mask to control what parts of the main texture get affected by the color variable.

so for example if I change the the color to red, one part of the main texture turns red whilst the other stays white.

I have tried looking into mask shaders on unify, however they don’t cover color change.
One shader I did find that seems to get close to what I want is here:
http://forum.unity3d.com/threads/33434-8-Textures-1-Color-Key-Mask-in-1-Pass-(Conceptual-Shader)

However I am not sure how fragment shaders work and how they effect iphone performance.

Any guidance is appreciated

Hi

I’m currently looking for similar shader for avatar customization.
Have you find out a way to do this properly?

Appreciate your help

Bump, what did you go with?