Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] acwa_v1_0.gz(6 Kbytes)
Manuscript Title: Colour coordinate calculations.
Authors: D.L. Bradly, R. Perrin
Program title: COLOUR COORDINATE CALCULATIONS
Catalogue identifier: ACWA_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 9(1975)305
Programming language: Fortran.
Computer: ICL 1904A.
Operating system: GEORGE 2L.
RAM: 6K words
Word size: 24
Keywords: Optics, Colour, Chromaticity Coordinates, Purity, Dominant wavelength, Trichromatic equation, Chromaticity diagram, Spectrum locus, C.I.E. standard observer.
Classification: 18.

Nature of problem:
The two subroutines CHROME and CRODAT described in this paper can be used in conjunction to perform two tasks which arise in colorimetry. The first is to calculate the colour of a light source from its given spectral energy distribution. The second is to calculate the dominant wave-length and purity of a colour from its chromaticity coordinates.

Solution method:
The integrals giving the tristimulus values are evaluated by the trapezoidal rule using 5nm steps, the distribution coefficients for the equal energy stimulus being taken as those for the C.I.E. standard observer (1931). The (x,y,z) chromaticity coordinates are evaluated by normalising the tristimulus values and the dominant wavelength and purity calculated by transforming from a cartesian to a polar representation.

Restrictions:
The spectral energy distribution must be entered as an array of size (80), giving the energy at 5 nm intervals from 380 to 775 nm inclusive: no other range or interval is acceptable. This has been found to be satisfactory because the errors produced in the machine calculations are acceptable when compared with those arising in the practical measurement of colour. The program incorporates only the 1931 CIE Standard Observer data (for a 2 degree field) but this could easily be replaced by the 1964 CIE Supplementary Standard Observer data (for a 10 degree field) if required by the user.

Running time:
Each cell to the subroutine CHROME takes about 0.5 s on the ICL 1904A.