A general function of cerebral cortex is to allow the flexible association of sensory stimuli with specific behaviours. Many neurons in parietal, prefrontal and motor cortical areas are activated both by particular movements and by sensory cues that trigger these movements, suggesting a role in linking sensation to action. For example, neurons in the lateral intraparietal area (LIP) encode both the location of visual stimuli and the direction of saccadic eye movements. LIP is not believed to encode non-spatial stimulus attributes such as colour. Here we investigated whether LIP would encode colour if colour was behaviourally linked to the eye movement. We trained monkeys to make an eye movement in one of two directions based alternately on the colour or location of a visual cue. When cue colour was relevant for directing eye movement, we found a substantial fraction of LIP neurons selective for cue colour. However, when cue location was relevant, colour selectivity was virtually absent in LIP. These results demonstrate that selectivity of cortical neurons can change as a function of the required behaviour.