Click flag, then press space to put the pen down. Press space again whenever you want to change the color.