RGB LED color changing

digitalWrite() takes HIGH or LOW as argument, not a number. So it's either ON or OFF. To control how bright an LED is, you need to use the PWM pins and use analogWrite() which accepts a value between 0 to 255. Read that link that xaxxx gave you. Figure out what PWM is, which pins support PWM, and how to re-wire your circuit and re-write your program to do what you want it to do.