Changed validate coordniates to validateInput and moved the colour check into that function