Shifting code from PICAXE to Arduino

can anyone help me with this C++ coding? i want the LED to change color based on the sensor reading...