Wednesday, November 30, 2011

Photoshop Wishlist #2


  1. When I apply noise reduction in Photoshop — no matter what technique I use — the apparent saturation decreases. Why is this? How can this be avoided? I don’t want to merely add saturation back in, but avoid it. I’ve noticed the same thing with small-sensor digital cameras, those that do lots of noise reduction in-camera.
  2. Are there any good techniques to get rid of the brightly colored noise found along edges? This is due to demosaicing the Bayer array of the sensor. Eliminating this noise usually leads to desaturation of the good pixels.
  3. Photoshop does not resize images well, and often generates interference patterns. Lots of research has been done on these kinds of algorithms, and it would be good to see these better solutions in Photoshop. Also, fractal resizing has many benefits and would be valuable to have also.
  4. I’d like to be able to fully edit ICC profiles in Photoshop. For example, I have a profile that uses the GRACoL ink colors, but has other parameters I’d like to change. The Custom CMYK interface is rather lacking.
  5. When you use curves in RGB, you can either do it with the Normal blending mode, which typically causes an increase in saturation, or you can do it with Luminosity blending, which decreases saturation. How about a simple method which does neither? I just want the tonality to change, not the basic coloration. Click here to see how it is done.
  6. A solid method of adding local contrast. ‘HDR toning’ does this a bit, and a lot of other things at the same time too, making it less useful. ‘Clarity’ is pretty good, but tends to produce halos also. There are better methods.
  7. A ‘Vibrance’ tool for CMYK. This increases saturation without causing any channel to blow or plug.
  8. I’ve noticed that there is a distinction between chroma, colorfulness, and saturation; not really sure how or what Photoshop does. A solid colorimetric model would be useful.
  9. More color spaces. XYZ and xyY would be useful.
  10. Using Munsell colors in the color picker would be great, as well as better out-of-gamut warnings.
  11. Better statistical color tools. Something that can show all the colors in an image as a three-dimensional solid would be great.
Yeah, I know. All of this development is expensive, and it is easy to criticize!

Monday, November 28, 2011

Using ICC Profiles for Creative Color Control

Notice: the ICC profiles I link to in this article are now accessible again.



COLOR MANAGEMENT has become far easier since the introduction of standard ICC profiles, developed by the International Color Consortium, a group of various computer, digital camera, and imaging companies. ICC profiles describe the color handing characteristics of cameras, scanners, printers, and computer monitors, as well as allowing for uniform methods of converting the colors from one device to another. For example, ICC profiles are used to convert the colors captured by a camera to those colors available on a printer.

ICC profiles define a mapping from the typically limited color spaces of devices into a universal color space (which can describe all colors), such as CIELAB or CIEXYZ; from these universal spaces, the colors can then be mapped to an output device. As such, ICC profiles recognize limits of what is possible with any given device, and allows us to compare the capabilities of one device with another. If an output device, like a computer display or digital printer, cannot show particular colors, then the software will use the ICC profile to change the colors to the closest ones available (this will often cause the image to lose detail or saturation).

ICC profiles are also stored in image files, thereby interpreting the colors of the file, and these profiles are used during image editing. Typically, JPEG image files delivered by cameras are encoded into standard color spaces which are independent of the particular make and model of camera. The most common color spaces are sRGB and AdobeRGB; these provide a wide enough gamut of color for practical use, while being compact enough to produce reasonably small file sizes. ICC calls these "three component color encoding" standards. Using these standards are convenient because we can use JPEG or TIFF images from a wide variety of cameras without worrying about the specific characteristics of each. For example, an sRGB color value of (255, 0, 0) will describe the same bright red color, no matter where the image came from.  Some software, including web browsers, actually assume that all image files are encoded in the sRGB standard.

Click here for an overview of RGB color spaces.


I did not create this image. Click here for source and attribution. This shows the relative color gamuts of various RGB color profiles, as well as the color gamut of the Epson 2200 printer.

Each of the standard RGB ICC profiles defines three primary colors: particular shades of red, green, and blue. A narrow standard such as sRGB can describe about 35% of all colors, and so will have primary colors that aren't quite as bright, colorful, or saturated as the Wide Gamut RGB standard, which can describe about 77.6% of all colors. The ProPhoto standard is even bigger and has mathematical primaries that aren't even real colors.  However, be aware that most computer monitors and digital printers cannot display or print color much beyond the sRGB standard, and so sRGB is generally recommended for most uses on the Internet and for consumer-grade printing.

So ICC profiles have these uses:
  • Describing the color capability of a device.
  • A standard method of converting the colors from one device to another.
  • Describing the colors in an image file such as a digital photograph.
  • A widely accepted color standard for cross-platform image interchange.
May I also propose another use of ICC profiles?
  • Creative use. Artists can use ICC profiles to precisely manipulate and control the gamut of color in images.
In his book Professional Photoshop (5th Edition), Dan Margulis described the use of 'false profiles': using ICC profiles as an alternative method of image manipulation. He used this method to greatly brighten shadow detail without modifying the color: this is difficult to do with the standard Photoshop tools.

"photographs very rarely turn out good likenesses"

The first thing that caught my attention was a portrait of mother that hung over the writing table; a photograph in a magnificent carved frame of rare wood, obviously taken abroad and judging from its size a very expensive one. I had never heard of this portrait and knew nothing of it before, and what struck me most of all was the likeness which was remarkable in a photograph, the spiritual truth of it, so to say ; in fact it looked more like a real portrait by the hand of an artist than a mere mechanical print. When I went in I could not help stopping before it at once.

"Isn't it, isn't it?" Versilov repeated behind me, meaning, "Isn't it like?" I glanced at him and was struck by the expression of his face. He was rather pale, but there was a glowing and intense look in his eyes which seemed shining with happiness and strength. I had never seen such an expression on his face.

"I did not know that you loved mother so much !" I blurted out, suddenly delighted.

He smiled blissfully, though in his smile there was a suggestion of something like a martyr's anguish, or rather something humane and lofty ... I don't know how to express it; but highly developed people, I fancy, can never have triumphantly and complacently happy faces. He did not answer, but taking the portrait from the rings with both hands brought it close to him, kissed it, and gently hung it back on the wall.

"Observe," he said; "photographs very rarely turn out good likenesses, and that one can easily understand: the originals, that is all of us, are very rarely like ourselves. Only on rare occasions does a man's face express his leading quality, his most characteristic thought. The artist studies the face and divines its characteristic meaning, though at the actual moment when he's painting, it may not be in the face at all. Photography takes a man as he is, and it is extremely possible that at moments Napoleon would have turned out stupid, and Bismarck tender. Here, in this portrait, by good luck the sun caught Sonia in her characteristic moment of modest gentle love and rather wild shrinking chastity….
—from A Raw Youth, by Fyodor Dostoevsky (1821-1881), translated by Constance Garnett

Monday, November 14, 2011

Additive versus Subtractive Color

Visually-uniform color wheelTHE COLOR WHEEL is a basic tool for representing the relationship between colors. It is basic in that it only attempts to show the relationship between particular hues, and it is a tool only insofar as it is useful and not misleading. But we must recognize its limitations.

This wheel is only valid for the sRGB color space, since it explicitly uses the primary colors of that space; it may or may not be useful for other color spaces. Also, be aware that since this color space uses only three primary colors, it won’t be able to portray the entire color gamut of human vision. The wheel illustrates the principles of additive color, where we mix together various colors of light to get other colors; additive color works well enough with back-lit computer monitors and televisions, and also digital projectors. But this wheel is definitely not valid for mixing paints, watercolors, or other materials with color. It only works with light.

Additive mixing is conceptually simple

Mixing colors with light is an unusually pure and simple process that follows relatively basic mathematical laws. A computer scientist or programmer, or a digital photographer, not experienced with the manifold nuances of paints and pigments, can get a good representation of the world’s color with relatively little effort. But not so with the artist who works in oil paint: color mixing is a far more complex phenomenon.

Digital photography uses additive color — each phosphor on the computer monitor adds together with its companion phosphors to create a particular color. Adding together colored lights gives us brighter resulting colors. This addition is implicit in the color wheel above: with red, green, and blue as our primaries, mixing them together gives us our bright secondary colors of cyan, magenta, and yellow. If, for whatever reason, you had a computer monitor with primary colors made up of the cyan, magenta, and yellow phosphors of the wheel, you’d get a secondary colors which would be brighter and also less saturated: the secondary color made by mixing yellow and magenta would be a bright pink, and not red. But if we were to change the set of phosphors used in a monitor, we still should be able to accurately (and fairly easily) predict how our colors would mix.

Subtractive mixing

Paint is far more complicated. Light falls on paint, and some of it is absorbed (usually turning it into heat) while some of it is reflected, which leads to the color that we see. Leaves are green because their chlorophyl reflects green light — and they absorb much red and more blue light. So real-world objects subtract out some of the light falling on them, reflecting back colored light. Computer monitors have three, fixed colors which mix together, while real-world pigments reflect or absorb colors throughout the spectrum: this makes the subtractive colors of the painter much more complex.

For this reason, exceptionally pure and saturated paints are necessarily going to be rather dark: if a paint reflects only the far end of the color spectrum, near violet, then by necessity it will reflect only a tiny fraction of the total light falling on it. Fluorescence helps here, because normally invisible ultraviolet light is shifted in frequency to visible light — but this only works if the radiation falling on our paint has ultraviolet in it.

The colors should look the same...

Digital cameras have precisely three different kinds of color sensors, and the typical human eye also has three kinds of color receptors (plus another more noticeably used in low light). A camera and the eye collapses a broad range of hundreds of distinguishable light frequencies to merely three stimuli or numbers. But consider what this implies: various colored objects may absorb and reflect all sorts of differing frequencies of light, but they all may appear to be the same color to the human eye under a given lighting condition. To complicate matters, digital cameras and human eyes don’t have matching color sensitivity: they are fairly close within the range used in photography, and under good lighting conditions such as daylight or bright incandescent, but they don’t match for all colors or under all lighting conditions. They most certainly won’t match under poor quality light, such as found with plasma discharge lamps (including fluorescent lamps) and LED lighting.

Therefore you cannot say that mixing a yellow paint and blue paint — even if they appear to perfectly match the colors on our color wheel — will give you a gray mixture. You need to know which yellow, and which blue paint are used. After all, a wide variety of reflectances will give you same yellow or blue color. You cannot use a color wheel like the one above to predict the outcome of mixing paint.

A good theory of subtractive color mixing?

If we could measure the reflectance of each pigment, and measure the spectrum of light falling on the pigments, then we could predict, with much bother and mathematics, what the resulting color mixture would look like, although still we would have to take into account whether the paint is wet or dry, or what kind of brushes and brushstrokes were used, plus the opacity of the paint, plus the thickness of the paint, plus the texture and color of the canvas or board or paper on which the paint is applied.

With additive color we can reliably produce white, black, and shades of gray by mixing together all three of our primary RGB colors in equal quantities. White, of course, can’t be mixed by any combination of colored paints, nor can we reliably get pure black by mixing together a few colors. The color of the canvas or backing, as well as the opacity of the paint, will limit the brightest and darkest colors that can be produced. As it so happens, the white and black paints used by artists does not evenly reflect or absorb light uniformly, making the process of creating tints or shades not completely straightforward — mixing a color with black may cause the color to shift towards warmer or cooler tones if not done carefully.

The solution, the difficult, laborious solution to subtractive color mixing is experience, or otherwise having access to sample swatches — a very large number, thousands, of color mixes — although experience is definitely needed if you want to do good work.

Minimal palettes of colors

A good, comprehensive, predictive theory of subtractive color mixing is complicated to the extreme, far more complicated than the already complicated theory of additive color mixing. To reduce complexity, in photography, we limit ourselves to three primary colors, knowing that not all the colors visible to the human eye can be represented in their full glory, and knowing that we accept these limitations in order to practice our art. In the realm of painting, artists (especially beginning artists, or those painting in oil in plein air) often limit themselves to six or so colors, plus one or two kinds of black paint, and one or two kinds of white paint.

The idea of three primary colors works well with additive color, but even though it is limited, it is still used almost universally in digital photography: plus we have the advantage of being able to use mathematical primaries that are out of the range of human vision, expanding the gamut of colors we are able to accurately represent. But the use of three primary colors in painting is disastrous; following this misguided theory could cause an artist to severely limit his palette unnecessarily — although, if that is his artistic intent, that’s fine, it just isn’t a good theory of color. And so, a painter must select a set of paints, and typically this set is more than three colors. If the color of any given paint cannot be mixed with the other paints in the set, then that is a primary color. An artist may use additional colors, such as burnt sienna, which are located within the chosen gamut, but using these is largely a convenience and not necessity.

Three numbers suffice to describe any given color of light or pigment under controlled conditions. But three colors are never sufficient to make up a complete system of colors.

Sadly, most commercial and much digital printing technology uses only three primary colors — cyan, magenta, and yellow — plus black, which gives us a limited gamut of possible color, and which is highly dependent on the whiteness of the printing paper used. While adequate, painters can do far better by adding other colors which cannot be mixed by these primaries. Typically speaking, a gamut made of six bright, saturated colors is adequate for creating a minimal palette, with the colors being fairly visually equidistant to each other, along with black and white. An older split-palette theory of color mixing used three pairs of primary colors, with one of each pair mixing cool and the other which mixed warm. Oddly enough, even though the split palette is somewhat deprecated in painting, a form of this is used in high-end digital printers: pastel primary colors are used to get better color in highlights, and only a few digital printers use good red, greens and blue inks which are otherwise not mixable.

While painters may envy the purity and simplicity of color mixing available to photographers, they must not assume that the overly simplistic tools of the photographer — like the digital color wheel — apply to their art. Likewise, photographers may have a certain smugness over their control of color, but instead they ought to be humbled by the skill required by the artist when mixing colors, as well as the range of the artist’s palette, which far exceeds that found in digital printers.