A method for synthesizing a substantially rectangular spectral representation of input color values in a tristimulus representation, the input color values resulting from an input spectrum of an image, wherein each of the input color values corresponds to a weight of a corresponding basis function of the tristimulus representation, wherein the basis functions of the tristimulus representation are defined functions, the method comprising: providing the input color values, wherein each input color value is associated with a corresponding analysis function; wherein the analysis functions are associated with the basis functions of the tristimulus representation; determining a first wavelength and a second wavelength of the substantially rectangular spectral representation based on the input color values; wherein the determining of the first wavelength and the second wavelength comprises: dividing two of the input color values by a sum of all of the input color values; and using a two dimensional look-up table to map results of the dividing to determine the first wavelength and the second wavelength; and computing a scale factor based on the first wavelength, the second wavelength, and any one of the input color values and its corresponding analysis function; wherein the computing of the scale factor comprises: performing a circular integration of the corresponding analysis function of the one of the input color values across an interval defined by the first wavelength and the second wavelength; and dividing the one of the input color values by a result of the circular integration to compute the scale factor; wherein: the synthesized substantially rectangular spectral representation is adapted to produce the input color values if the synthesized substantially rectangular spectral representation were applied to the analysis functions corresponding to the input color values, at the first wavelength the substantially rectangular spectral representation transitions from a lower value to the scale factor and at the second wavelength the substantially rectangular spectral representation transitions from the scale factor to the lower value, and if the first wavelength is smaller than the second wavelength, in between the first and second wavelengths, the substantially rectangular spectral representation takes on the scale factor, and if the first wavelength is greater than the second wavelength, in between the first and second wavelengths, the substantially rectangular spectral representation takes on the lower value; and the lower value of the rectangular spectral representation is equal to zero. providing the input color values, wherein each input color value is associated with a corresponding analysis function; wherein the analysis functions are associated with the basis functions of the tristimulus representation; determining a first wavelength and a second wavelength of the substantially rectangular spectral representation based on the input color values; wherein the determining of the first wavelength and the second wavelength comprises: dividing two of the input color values by a sum of all of the input color values; and using a two dimensional look-up table to map results of the dividing to determine the first wavelength and the second wavelength; and computing a scale factor based on the first wavelength, the second wavelength, and any one of the input color values and its corresponding analysis function; wherein the computing of the scale factor comprises: performing a circular integration of the corresponding analysis function of the one of the input color values across an interval defined by the first wavelength and the second wavelength; and dividing the one of the input color values by a result of the circular integration to compute the scale factor; the synthesized substantially rectangular spectral representation is adapted to produce the input color values if the synthesized substantially rectangular spectral representation were applied to the analysis functions corresponding to the input color values, at the first wavelength the substantially rectangular spectral representation transitions from a lower value to the scale factor and at the second wavelength the substantially rectangular spectral representation transitions from the scale factor to the lower value, and if the first wavelength is smaller than the second wavelength, in between the first and second wavelengths, the substantially rectangular spectral representation takes on the scale factor, and if the first wavelength is greater than the second wavelength, in between the first and second wavelengths, the substantially rectangular spectral representation takes on the lower value; and the lower value of the rectangular spectral representation is equal to zero.