using number in color code

hi this is my code :

if (deed > 0)
            {
                renderer.material.color = new Color(1 - (Stat.deed / 100), 1 - (Stat.deed / 100), 1F);
            }

deed is an int between -100 and 100 … I want that as the deed goes up , the color of object get lighter with this formula " 1 - (Stat.deed / 100) " … but when I add 10 to deed the color of my object get white!!! what shoud I do? I want that as the deed goes up the Red and green color of my color get half… if deed = 100 the red and green = 0.5 (light blue) and if it is 0 the red and green color = 0 (dark blue) … what should I do in this situation?

thnx… the problem was the deed… it should be float not int… it solved… thnx :wink:

float cd = Mathf.Clamp01(0.02 * Stat.deed);
renderer.material.color = new Color( cd, cd, 1 );