1\
2.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
4.\" the corresponding HTML page on the Netpbm website, generate a patch
5.\" against that, and send it to the Netpbm maintainer.
6.TH "Ppmcie User Manual" 0 "July 31, 2005" "netpbm documentation"
7
8.SH NAME
9
10ppmcie - draw a CIE color chart as a PPM image
11
12.UN synopsis
13.SH SYNOPSIS
14
15
16\fBppmcie\fP
17
18[
19\fB-rec709\fP|\fB-cie\fP|\fB-ebu\fP|\fB-hdtv\fP|\fB-ntsc\fP|\fB-smpte\fP
20]
21[\fB-xy\fP|\fB-upvp\fP]
22
23[\fB-red\fP \fIrx\fP \fIry\fP]
24
25[\fB-green\fP \fIgx\fP \fIgy\fP]
26
27[\fB-blue\fP \fIbx\fP \fIby\fP]
28
29[\fB-white\fP \fIwx\fP \fIwy\fP]
30
31[\fB-size\fP \fIedge\fP]
32
33[{\fB-xsize\fP|\fB-width\fP} \fIwidth\fP]
34
35[{\fB-ysize\fP|\fB-height\fP} \fIheight\fP]
36
37[\fB-noblack\fP]
38[\fB-nowpoint\fP]
39[\fB-nolabel\fP]
40[\fB-noaxes\fP]
41[\fB-full\fP]
42
43.UN description
44.SH DESCRIPTION
45.PP
46This program is part of
47.BR "Netpbm" (1)\c
48\&.
49
50\fBppmcie\fP creates a PPM file containing a plot of the CIE
51"tongue" color chart -- to the extent possible in a PPM
52image.  Alternatively, creates a pseudo-PPM image of the color tongue
53using RGB values from a color system of your choice.
54.PP
55The CIE color tongue is an image of all the hues that can be described
56by CIE X-Y chromaticity coordinates.  They are arranged on a two
57dimensional coordinate plane with the X chromaticity on the horizontal
58axis and the Y chromaticity on the vertical scale.  (You can choose
59alternatively to use CIE u'-v' chromaticity coordinates, but the
60general idea of the color tongue is the same).
61.PP
62Note that the PPM format specifies that the RGB values in the file are
63from the ITU-R Recommendation BT.709 color system, gamma-corrected.
64And positive.  See
65.BR "ppm" (5)\c
66\& for details.  If
67you use one of the color system options on \fBppmcie\fP, what you get
68is not a true PPM image, but is very similar.  If you display such
69\fBppmcie\fP output using a device that expects PPM input (which
70includes just about any computer graphics display program), it will
71display the wrong colors.
72.PP
73However, you may have a device that expects one of these variations on
74PPM.
75.PP
76In every RGB color system you can specify, including the default
77(which produces a true PPM image) there are hues in the color tongue
78that can't be represented.  For example, monochromatic blue-green with
79a wavelength of 500nm cannot be represented in a PPM image.
80.PP
81For these hues, \fBppmcie\fP substitutes a similar hue as follows:
82They are desaturated and rendered as the shade where the edge of the
83Maxwell triangle intersects a line drawn from the requested shade to
84the white point defined by the color system's white point.
85Furthermore, unless you specify the \fB-full\fP option, \fBppmcie\fP
86reduces their intensity by 25% compared to the true hues in the image.
87.PP
88\fBppmcie\fP draws and labels the CIE X-Y coordinate axes unless you
89choose otherwise with options.
90.PP
91\fBppmcie\fP draws the Maxwell triangle for the color system in use
92on the color tongue.  The Maxwell triangle is the triangle whose
93vertices are the primary illuminant hues for the color system.  The
94hues inside the triangle show the color gamut for the color system.
95They are also the only ones that are correct for the CIE X-Y
96chromaticity coordinates shown.  (See explanation above).  \fBppmcie\fP
97denotes the Maxwell triangle by rendering it at full brightness, while
98rendering the rest of the color tongue as 3/4 brightness.  You can turn
99this off with options.
100.PP
101\fBppmcie\fP also places a black cross at the color system's white
102point (with the center of the cross open so you can actually see the
103white color) and displays in text the CIE X-Y chromaticities of the
104primary illuminants and white point for the color system.  You can
105turn this off with options, though.
106.PP
107\fBppmcie\fP annotates the periphery of the color tongue with the
108wavelength, in nanometers of the monochromatic hues which appear
109there.
110.PP
111\fBppmcie\fP displays the black body chromaticity curve for Planckian
112radiators from 1000 to 30000 kelvins on the image.  This curve traces the
113colors of black bodies as various temperatures.
114.PP
115You can choose from several standard color systems, or specify one of
116your own numerically.
117.PP
118CIE charts, by their very nature, contain a very large number of
119colors.  If you're encoding the chart for a color mapped device or
120file format, you'll need to use \fBpnmquant\fP or \fBppmdither\fP to
121reduce the number of colors in the image.
122
123.UN options
124.SH OPTIONS
125.PP
126You may abbreviate any option to its shortest unique prefix.
127
128
129.TP
130\fB-rec709\fP
131.TP
132\fB-cie\fP
133.TP
134\fB-ebu\fP
135.TP
136\fB-hdtv\fP
137.TP
138\fB-ntsc\fP
139.TP
140\fB-smpte\fP
141Select a standard color system whose gamut to plot.  The default is
142\fB-rec709\fP, which chooses ITU-R Recommendation BT.709,
143gamma-corrected.  This is the only color system for which
144\fBppmcie\fP's output is a true PPM image.  See explanation above.
145\fB-ebu\fP chooses the primaries used in the PAL and SECAM
146broadcasting standards.  \fB-ntsc\fP chooses the primaries specified
147by the NTSC broadcasting system (few modern monitors actually cover
148this range).  \fB-smpte\fP selects the primaries recommended by the
149Society of Motion Picture and Television Engineers (SMPTE) in
150standards RP-37 and RP-145, and \fB-hdtv\fP uses the much broader
151\fIHDTV ideal\fP primaries.  \fB-cie\fP chooses a color system that
152has the largest possible gamut within the spectrum of the chart.  This
153is the same color system as you get with the \fB-cie\fP option to
154John Walker's \fBcietoppm\fP program.
155
156.TP
157\fB-xy\fP
158plot CIE 1931 x y chromaticities.  This is the default.
159
160.TP
161\fB-upvp\fP
162plot u' v' 1976 chromaticities rather than CIE 1931 x y
163chromaticities.  The advantage of u' v' coordinates is that equal
164intervals of distance on the u' v' plane correspond roughly to the
165eye's ability to discriminate colors.
166
167.TP
168\fB-red\fP\fI rx ry\fP
169specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the red
170illuminant of a custom color system and selects the custom system.
171
172.TP
173\fB-green\fP\fI gx gy\fP
174specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the green
175illuminant of the color system and selects the custom system.
176
177.TP
178\fB-blue\fP\fI bx by\fP
179specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the blue
180illuminant of the color system and selects the custom system.
181
182.TP
183\fB-white\fP\fI wx wy\fP
184specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the white
185point of the color system and selects the custom system.
186
187.TP
188\fB-size\fP\fI edge\fP
189Create an image of \fIedge\fP by \fIedge\fP pixels.  The default is
190512x512.
191
192.TP
193\fB-xsize|-width\fP\fI width\fP
194Sets the width of the generated image to \fIwidth\fP pixels.  The
195default width is 512 pixels.  If the height and width of the image are
196not the same, the CIE diagram will be stretched in the longer
197dimension.
198
199.TP
200\fB-ysize|-height\fP\fI height\fP
201Sets the height of the generated image to \fIheight\fP pixels.  The
202default height is 512 pixels.  If the height and width of the image
203are not the same, the CIE diagram will be stretched in the longer
204dimension.
205
206.TP
207\fB-noblack\fP
208Don't plot the black body chromaticity curve.
209
210.TP
211\fB-nowpoint\fP
212Don't plot the color system's white point.
213
214.TP
215\fB-nolabel\fP
216Omit the label.
217
218.TP
219\fB-noaxes\fP
220Don't plot axes.
221
222.TP
223\fB-full\fP
224Plot the entire CIE tongue in full brightness; don't dim the part
225which is outside the gamut of the specified color system (i.e. outside
226the Maxwell triangle).
227
228
229
230.UN interpret
231.SH INTERPRETATION OF COLOR CHART
232.PP
233A color spectrum is a linear combination of one or more monochromatic
234colors.
235.PP
236A color is a set of color spectra that all look the same to the
237human eye (and brain).  Actually, for the purposes of the definition,
238we assume the eye has infinite precision, so we can call two color
239spectra different colors even though they're so close a person
240couldn't possibly tell them apart.
241.PP
242The eye contains 3 kinds of color receptors (cones).  Each has a
243different response to the various monochromatic colors.  One kind
244responds most strongly to blue, another red, another green.  Because
245there are only three, many different color spectra will excite the
246cones at exactly the same level, so the eye cannot tell them apart.
247All such spectra that excite the cones in the same way are a single
248color.
249.PP
250Each point in the color tongue represents a unique color.  But
251there are an infinite number of color spectra in the set that is that
252color; i.e. an infinite number of color spectra that would look to you
253like this point.  A machine could tell them apart, but you could not.
254.PP
255Remember that the colors outside the highlighted triangle are
256approximations of the real colors because the PPM format cannot
257represent them (and your display device probably cannot display them).
258That is, unless you're using a variation of PPM and a special display
259device, as discussed earlier in this manual.
260.PP
261A color is always relative to some given maximum brightness.  A
262particular beam of light looks lime green if in a dim field, but
263pea green if in a bright field.  An image on a movie screen may
264look pitch black because the projector is not shining any light on
265it, but when you turn off the projector and look at the same spot in
266room light, the screen looks quite white.  The same light from that spot
267hit your eye with the project on as with it off.
268.PP
269The chart shows two dimensions of color.  The third is intensity.
270All the colors in the chart have the same intensity.  To get all
271possible colors in the gamut, Make copies of the whole chart at every
272intensity between zero and the maximum.
273.PP
274The edge of the tongue consists of all the monochromatic colors.
275A monochromatic color is one with a single wavelength.  I.e. a color
276that is in a rainbow.  The numbers you see are the wavelengths in
277nanometers.
278.PP
279Any straight line segment within the tongue contains colors which
280are linear combinations of two colors -- the colors at either end of
281the line segment.
282.PP
283Any color in the chart can be created from two other colors (actually,
284from any of an infinite number of pairs of other colors).
285.PP
286All the colors within a triangle inside the tongue can be created
287from a linear combination of the colors at the vertices of that triangle.
288.PP
289Any color in the tongue can be created from at most 3 monochromatic
290colors.
291.PP
292The highlighted triangle shows the colors that can be expressed
293in the tristimulus color system you chose.  (ITU-R BT.709 by default).
294The corners of the triangle are the 3 primary illuminants in that
295system (a certain red, green, and blue for BT.709).  The edges of
296the triangle, then, represent the colors you can represent with two
297of the primary illuminants (saturated colors), and the interior colors
298require all three primary illuminants (are not saturated).
299.PP
300In the ITU-R BT.709 color system (the default), the white point is
301defined as D65, which is (and is named after) the color of a black
302body at 6502 kelvins.  Therefore, you should see the temperature curve
303on the image pass through the white part of the image, and the cross
304that marks the white point, at 6502 kelvins.
305.PP
306D65 white is supposed to be the color of the sun.  If you have a
307perfect BT.709 display device, you should see the color of the sun
308at the white point cross.  That's an important color, because when you
309look at an object in sunlight, the color that reflects of the object
310is based on the color of sunlight.  Note that the sun produces a
311particular color spectrum, but many other color spectra are the same
312color, and display devices never use the actual color spectrum of the
313sun.
314.PP
315The colors at the corners of the triangle have the chromaticities
316phosphors in a monitor that uses the selected color system.  Note
317that in BT.709 they are very close to monochromatic red, green,
318and blue, but not quite.  That's why you can't display even one true
319color of the rainbow on a video monitor.
320.PP
321Remember that the chart shows colors of constant intensity,
322therefore the corners of the triangles are not the full colors of the
323primary illuminants, but only their chromaticities.  In fact, the
324illuminants typically have different intensities.  In BT.709, the
325blue primary illuminant is far more intense than the green, which is
326more intense than the red.  Designers did this in order to make an
327equal combination of red, green, and blue generate gray.  I.e.  a
328combination of full strength red, full strength green, and full
329strength blue BT.709 primary illuminants is D65 white.
330.PP
331The tongue has a sharp straight edge at the bottom because that's
332the limit of human vision.  There are colors below that line, but they
333involve infrared and ultraviolet light, so you can't see them.  This
334line is called the "line of purples."
335
336
337.UN seealso
338.SH SEE ALSO
339.BR "ppmdither" (1)\c
340\&,
341.BR "pnmquant" (1)\c
342\&,
343.BR "ppm" (5)\c
344\&
345
346.UN author
347.SH AUTHOR
348.PP
349Copyright (C) 1995 by John Walker (\fIkelvin@fourmilab.ch\fP)
350.PP
351WWW home page:
352.UR http://www.fourmilab.ch/
353http://www.fourmilab.ch/
354.UE
355\&
356.PP
357Permission to use, copy, modify, and distribute this software and its
358documentation for any purpose and without fee is hereby granted,
359without any conditions or restrictions.  This software is provided as
360is without express or implied warranty.
361.SH DOCUMENT SOURCE
362This manual page was generated by the Netpbm tool 'makeman' from HTML
363source.  The master documentation is at
364.IP
365.B http://netpbm.sourceforge.net/doc/ppmcie.html
366.PP