Abstract Color classification by a statistical pattern recognition method, the subspace method, was implemented by a simple optical system including a liquid crystal spatial light modulator. Area coding filters corresponding to eigenvectors were drawn on the liquid crystal panel. The vector inner products between the filter functions of each class and the input spectral distributions were calculated instantaneously. To construct low-dimensional subspaces for each class, the recognition system for arbitrary spectral distributions was used and efficient classification filters were constructed after several iterative learning cycles. Samples with small hue differences were correctly classified.