How do I change object color (keep the texture)?

using java script?

To Change colour you need to use this: http://unity3d.com/support/documentation/ScriptReference/Material-color.html

If you need more complex recoloring (keeping some colors intact while changing other etc.), you can check Colorify on asset store