Adaptive-Brigthness with arduino

I used a RGB led and a photoresistor. If the photoresistor senses light at a threshold it turns on the red light, if it senses the light to be brighter to another threshold, the blue light turns on. At le brightest level of the light, the green light turns on.