The traditional explanation of the McCollough effect (ME) by selective adaptation of single detectors selective to color and orientation suffers from a number of inconsistencies: 1) the ME lasts much longer (from several days up to 3 months) than the ordinary adaptation, the decay of the effect being completely arrested by night sleep or occluding the eye for a long time; 2) the strength of the ME practically does not depend on the intensity of adapting light; and 3) a set of related pattern-contingent after-effects discovered later required for such an explanation new detectors, specific for other patterns. These properties can be explained, however, in the framework of associative memory and novelty filters. A computational model has been developed, which consists of 1) an input layer of two (left and right eyes) square matrices with two analog receptors (red and green) in each pixel, 2) an isomorphic associative neural layer, each analog neuron being synaptically connected with all receptors of both eyes, and 3) an output layer (novelty filter). The modification of synaptic efficacies conforms to the Hebb learning rule. The function of the model was examined by simulation. After a few presentations of colored gratings, the model displays the ME that is slowly destroyed by subsequent presentations of random pictures. With a sufficiently large receptor matrix, the effect lasts a thousand times longer than the period of adaptation. Continuous darkness does not change the strength of the effect. Like in real ME, the model does not display interocular transfer. The model can account for different pattern-contingent color after-effects without assuming any predetermined specific detectors. Such detectors are constructed in the course of adaptation to specific stimuli (gratings).