Return to index

NAME

cxy - set the CIE (x,y) chromaticity for the current color

SYNOPSIS

cxy x y

DESCRIPTION

This entity sets the current color using (x,y) chromaticity coordinates for the 1931 CIE standard 2 degree observer. Legal values for x and y are greater than zero and sum to less than one, and more specifically they must fit within the curve of the visible spectrum. The x coordinate roughly corresponds to the red part of the spectrum and the y coordinate corresponds to the green. The CIE z coordinate is implicit, since it is equal to (1-x-y).

All colors in MGF are absolute, thus colorimeter measurements should be conducted the same for surfaces as for light sources. Applying a standard illuminant calculation is redundant and introduces inaccuracies, and should therefore be avoided if possible.

Conversion between CIE colors and those more commonly used in computer graphics are described in the application notes section 6.1.1.

EXAMPLE

# Set unnamed color context
c
# Set CIE chromaticity to a bluish hue
cxy .15 .2
# Apply color to diffuse reflectance of 15%
rd .15

SEE ALSO

c, cct, cmix, cspec