Changing lightning color on other object

public class PortalController : MonoBehaviour {

public GameObject Lightning;

void Update () {
	if (Input.GetMouseButtonDown (0)) {
		RaycastHit hit;
		Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
		Light lt = GetComponent<Light> ();

		if (Physics.Raycast(ray, out hit)) {
			if (hit.transform.name == "PanelBlue" ){
				Debug.Log ("BtnRightPressed");
				lt.color = Color.blue;
			}
			else if (hit.transform.name == "PanelRed" ){
				Debug.Log ("BtnRightPressed");
				lt.color = Color.red;
			}
	}
}

}
}

And … It doesn’t work
This code might switch the lightning color when i press the button (button and the “public GameObject Lightning;” are different object)
Can u help to solve this problem?