PPMCIE(1)
π ppmcie β the vibe-coded CIE color chart, bestie edition π
okay so real talk, this is the Ppmcie User Manual, section (1) of the general commands manual, and it's literally about drawing a CIE color chart as a PPM image. let's get into it π
β¨ NAME β¨
ppmcie β draws a CIE color chart and hands it to you as a PPM image. that's it, that's the whole job π
π SYNOPSIS π
ppmcie
[ -rec709|-cie|-ebu|-hdtv|-ntsc|-smpte ] [-xy|-upvp]
[-red rx ry]
[-green gx gy]
[-blue bx by]
[-white wx wy]
[-size edge]
[{-xsize|-width} width]
[{-ysize|-height} height]
[-noblack] [-nowpoint] [-nolabel] [-noaxes] [-full]
π¦ DESCRIPTION π¦
so this program is part of Netpbm(1), and here's the tea: ppmcie creates a PPM file containing a plot of the CIE "tongue" color chart β to the extent that's even possible in a PPM image, which, lol, we'll get to. alternatively, it can create a pseudo-PPM image of the color tongue using RGB values from a color system of your choosing. your chart, your rules π
the CIE color tongue is an image of all the hues that can be described by CIE X-Y chromaticity coordinates. they get arranged on a two dimensional coordinate plane with the X chromaticity on the horizontal axis and the Y chromaticity on the vertical scale. (you can alternatively choose to use CIE u'-v' chromaticity coordinates instead, but the whole general idea of the color tongue stays the same, bestie.)
now. important warning time because this part matters. the PPM format specifies that the RGB values in the file come from the ITU-R Recommendation BT.709 color system, gamma-corrected. and positive. see ppm(1) for the details. if you use one of the color system options on ppmcie, what you get is not a true PPM image, it's just very similar. and if you display that ppmcie output using a device that expects PPM input (and that includes literally just about any computer graphics display program), it will display the wrong colors. π
that said! you may have a device that actually expects one of these variations on PPM. so. iykyk πΈ
here's the thing though β in every RGB color system you can specify, including the default (which is the one that produces a true PPM image) there are hues in the color tongue that just can't be represented. example: monochromatic blue-green with a wavelength of 500nm cannot be represented in a PPM image. periodt.
for these hues, ppmcie substitutes a similar hue, like this: they get desaturated and rendered as the shade where the edge of the Maxwell triangle intersects a line drawn from the requested shade to the white point defined by the color system's white point. furthermore, unless you specify the -full option, ppmcie reduces their intensity by 25% compared to the true hues in the image.
ppmcie draws and labels the CIE X-Y coordinate axes, unless you decide otherwise with options. main character behavior honestly π
ppmcie also draws the Maxwell triangle for the color system in use on the color tongue. the Maxwell triangle is the triangle whose vertices are the primary illuminant hues for the color system. the hues inside the triangle show the color gamut for that color system β and they're also the only ones that are correct for the CIE X-Y chromaticity coordinates shown. (see that explanation above, yeah.) ppmcie denotes the Maxwell triangle by rendering it at full brightness, while rendering the rest of the color tongue as 3/4 brightness. you can turn this off with options if that's not your aesthetic.
ppmcie also places a black cross at the color system's white point (with the center of the cross left open so you can actually see the white color, iconic) and displays in text the CIE X-Y chromaticities of the primary illuminants and white point for the color system. you can turn this off with options too, no pressure.
ppmcie annotates the periphery of the color tongue with the wavelength, in nanometers, of the monochromatic hues which appear there. π
ppmcie displays the black body chromaticity curve for Planckian radiators from 1000 to 30000 kelvins on the image. this curve traces the colors of black bodies as various temperatures. literally so cool.
you can choose from several standard color systems, or specify one of your own numerically. build-a-bear but for color science π
okay and one more heads up: CIE charts, by their very nature, contain a very large number of colors. if you're encoding the chart for a color mapped device or file format, you'll need to usepnmquantorppmditherto reduce the number of colors in the image. don't skip this step and then act surprised, bestie π
β¨ OPTIONS β¨
in addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), ppmcie recognizes the following command line options:
you may abbreviate any option to its shortest unique prefix. shortcuts are self-care fr fr π
-rec709-cie-ebu-hdtv-ntsc-smpteβ select a standard color system whose gamut to plot. the default is-rec709, which chooses ITU-R Recommendation BT.709, gamma-corrected. this is the only color system for whichppmcie's output is a true PPM image. (see the explanation above, it's all connected.)-ebuchooses the primaries used in the PAL and SECAM broadcasting standards.-ntscchooses the primaries specified by the NTSC broadcasting system (few modern monitors actually cover this range, so, yeah).-smpteselects the primaries recommended by the Society of Motion Picture and Television Engineers (SMPTE) in standardsRP-37andRP-145, and-hdtvuses the much broader HDTV ideal primaries.-ciechooses a color system that has the largest possible gamut within the spectrum of the chart. this is the same color system as you get with the-cieoption to John Walker'scietoppmprogram. so many choices, all valid π«Ά-xyβ plot CIE 1931 x y chromaticities. this is the default. classic.-upvpβ plot u' v' 1976 chromaticities rather than CIE 1931 x y chromaticities. the advantage of u' v' coordinates is that equal intervals of distance on the u' v' plane correspond roughly to the eye's ability to discriminate colors. your eyeballs, but mathematically respected π-redrx ry β specifies the CIE x and y co-ordinates of the red illuminant of a custom color system and selects the custom system. custom mode activated π₯-greengx gy β specifies the CIE x and y co-ordinates of the green illuminant of the color system and selects the custom system.-bluebx by β specifies the CIE x and y co-ordinates of the blue illuminant of the color system and selects the custom system.-whitewx wy β specifies the CIE x and y co-ordinates of the white point of the color system and selects the custom system.-sizeedge β create an image of edge by edge pixels. the default is512x512. nice and even.-xsize|-widthwidth β sets the width of the generated image to width pixels. the default width is512pixels. if the height and width of the image are not the same, the CIE diagram will be stretched in the longer dimension. proceed accordingly bestie, no one's judging π-ysize|-heightheight β sets the height of the generated image to height pixels. the default height is512pixels. and again: if the height and width of the image are not the same, the CIE diagram will be stretched in the longer dimension. same deal π-noblackβ don't plot the black body chromaticity curve.-nowpointβ don't plot the color system's white point.-nolabelβ omit the label.-noaxesβ don't plot axes.-fullβ plot the entire CIE tongue in full brightness; don't dim the part which is outside the gamut of the specified color system (i.e. outside the Maxwell triangle). go big or go home β
π INTERPRETATION OF COLOR CHART π
okay bestie, buckle up, this is the part where it gets philosophical π¦
A color spectrum is a linear combination of one or more monochromatic colors.
And a color? A color is a set of color spectra that all look the same to the human eye (and brain). Fr fr. And actually β for the purposes of this definition we just assume your eye has infinite precision, so we're allowed to call two color spectra "different colors" even though they're soooo close a person couldn't possibly tell them apart. the audacity tbh π
The eye contains 3 kinds of color receptors (cones). Each one has a different response to the various monochromatic colors. One kind responds most strongly to blue, another to red, another to green. And because there are only three, many different color spectra will excite the cones at exactly the same level, so the eye literally cannot tell them apart. All such spectra that excite the cones in the same way are a single color. periodt π
Each point in the color tongue represents a unique color. But there are an infinite number of color spectra in the set that is that color β i.e. an infinite number of color spectra that would look to you like this point. A machine could tell them apart, but you could not. iconic honestly β¨
Remember that the colors outside the highlighted triangle are approximations of the real colors, because the PPM format cannot represent them (and your display device probably cannot display them either). That is β unless you're using a variation of PPM and a special display device, as discussed earlier in this manual. iykyk π
A color is always relative to some given maximum brightness. A particular beam of light looks lime green if in a dim field, but pea green if in a bright field. And like β an image on a movie screen may look pitch black because the projector isn't shining any light on it, but when you turn off the projector and look at the same spot in room light, the screen looks quite white?? The same light from that spot hit your eye with the projector on as with it off. make it make sense π
The chart shows two dimensions of color. The third is intensity. All the colors in the chart have the same intensity. So to get all possible colors in the gamut, Make copies of the whole chart at every intensity between zero and the maximum. lowkey a lot of copies but okay π
The edge of the tongue consists of all the monochromatic colors. A monochromatic color is one with a single wavelength β i.e. a color that is in a rainbow π. The numbers you see are the wavelengths in nanometers.
Any straight line segment within the tongue contains colors which are linear combinations of two colors β the colors at either end of the line segment.
Any color in the chart can be created from two other colors (actually, from any of an infinite number of pairs of other colors). no cap.
All the colors within a triangle inside the tongue can be created from a linear combination of the colors at the vertices of that triangle.
Any color in the tongue can be created from at most 3 monochromatic colors.
The highlighted triangle shows the colors that can be expressed in the tristimulus color system you chose (ITU-R BT.709 by default). The corners of the triangle are the 3 primary illuminants in that system (a certain red, green, and blue for BT.709). The edges of the triangle, then, represent the colors you can represent with two of the primary illuminants (saturated colors), and the interior colors require all three primary illuminants (are not saturated). the way the geometry just does that π§
In the ITU-R BT.709 color system (the default), the white point is defined as D65, which is (and is named after) the color of a black body at 6502 kelvins. Therefore, you should see the temperature curve on the image pass through the white part of the image, and the cross that marks the white point, at 6502 kelvins. π‘οΈ
D65 white is supposed to be the color of the sun βοΈ. If you have a perfect BT.709 display device, you should see the color of the sun at the white point cross. That's an important color, because when you look at an object in sunlight, the color that reflects of the object is based on the color of sunlight. Note that the sun produces a particular color spectrum, but many other color spectra are the same color, and display devices never use the actual color spectrum of the sun. π rude but true
The colors at the corners of the triangle have the chromaticities phosphors in a monitor that uses the selected color system. Note that in BT.709 they are very close to monochromatic red, green, and blue β but not quite. That's why you can't display even one true color of the rainbow on a video monitor. the betrayal π«Ά
Remember that the chart shows colors of constant intensity, therefore the corners of the triangles are not the full colors of the primary illuminants, but only their chromaticities. In fact, the illuminants typically have different intensities. In BT.709, the blue primary illuminant is far more intense than the green, which is more intense than the red. Designers did this in order to make an equal combination of red, green, and blue generate gray. I.e. a combination of full strength red, full strength green, and full strength blue BT.709 primary illuminants is D65 white. slay, physics π
The tongue has a sharp straight edge at the bottom because that's the limit of human vision. There are colors below that line, but they involve infrared and ultraviolet light, so you can't see them. This line is called the "line of purples." πΈ
π SEE ALSO π
ppmdither(1)pnmquant(1)ppm(1)
π AUTHOR π
Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch)
WWW home page: http://www.fourmilab.ch/
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. This software is provided as is without express or implied warranty.
π¦ DOCUMENT SOURCE π¦
This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at
http://netpbm.sourceforge.net/doc/ppmcie.html
and that's a wrap bestie π
this whole thing is from the netpbm documentation, dated 31 July 2005, and it lives as the Ppmcie User Manual(1). go forth and color chart, you got this π«Άπβ¨
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms