The ability of humans for color constancy, i.e. the ability to correct for color deviation caused by a different illumination, is far beyond computer vision performances: nowadays, automatic color constancy is still a difficult problem. This article proposes a new step forward towards solving this color constancy problem. Basically, it consists in learning how illumination can affect some reference objects. During a learning stage, images are taken under various illuminations, allowing for automatic building of a model explaining color changes. The model can explain complex non-linear color transformations with only a few parameters. Therefore, the observation of color variations in a few reference regions (e.g. known object) is enough to estimate the global color changes.