It is shown that a form of the Wilson-Cowan equations representing large-scale activity in interacting neural populations can implement a form of the Retinex algorithm for color vision. It has also been shown recently that a color enhancement algorithm closely related to Retinex can be derived from a variational principle. It follows that a variational principle exists for equations of Wilson-Cowan type. Thus the Wilson-Cowan equations are the Euler-Lagrange solution of the minimization of an energy functional. This result suggests many interesting neural applications.