Category Archives: Color

  • Bit Depth

    In the final post of this week, we look at bit depth – the number of colors that can be described by an image’s numerical values. 

    In addition to the color model and profile, each pixel’s color/tone is governed by the number of available colors or tones. This is measured in powers of 2 (1 bit), and is called bit depth. The number can range from two colors (white, black) up to trillions of theoretical colors. 

    Bit depth is sometimes compared to the number of crayons you have to make a drawing. When you have 16 million crayons, you can make any color, and it’s easy to find in-between colors. When you only have a few, you can see distinct differences between shades of colors.

    8-bit and 16-bit per channel color

    Most conventional digital images use 8-bit color for each channel. This provides for 256 shades of gray for black and white images, and 16 million color combinations for RGB images (256 red x 256 green x 256 blue). 16 bit-per channel color provides a whopping 281 trillion colors.

    Higher bit depth helps to create smoothness of tonal and color gradations. In most cases, it’s hard for people to distinguish any advantage beyond 8-bit color in finished images. Only a small percentage of monitors or printers are capable of making use of more than 8 bits. So that’s enough, right? Well, not exactly. 

    16 bit for image editing

    If there are not enough “in-between” colors, you will see banding or posterization. While 8 bits per channel is typically fine for finished images, the additional bits can be useful in image editing. Sometimes you need to spread out the tones or colors in a part of the image such as the shadow areas. As you spread them out to enhance shadow detail or add contrast, you may cause posterization because there are not enough tones in between to create a smooth transition.

    This image shows blotchy posterization in the sky colors. This is caused by stretching the tones too far as you try to enhance contrast in this part of the tonal range. In this case, the original was an 8-bit JPEG file. Capturing in the higher bit depth of raw format would eliminate this problem.

    High-quality image editing is often done in 16 bit to reduce any possible posterization. Note that this makes an image file twice as large, and incompatible with some formats, devices and software. You may not see any visible improvement in many instances. If you don’t need to make significant changes to color, and the end result is an 8 bit file, editing in 16 bit may produce no visible improvement.    

    Capture in high depth

    Higher bit depth is also extremely useful for capturing images. The extra tones can be used to capture additional highlight and shadow detail which can be used in post processing. This extended range of tones can allow you to recover highlights that would otherwise be entirely washed out, or shadows that would be blocked up with no detail. 

    Modern digital cameras frequently offer the option of capturing in higher bit depth than 8 bit color. This is particularly true when shooting in the camera’s raw format. In general, you’re better off capturing in the highest bit depth a camera is capable of, even though it will produce a bigger file. 

    HDR Images 

    Images that make use of more than 8 bits per channel are generically referred to as High Dynamic Range (HDR). HDR images can be created by using a camera with a high bit depth sensor, or by combining images shot at different exposures. 

    Aren’t HDR images those “grungy” looking photos? 

    One of the most common ways to make use of HDR image data is to create a “grungy” look to your photos. Because HDR images contain so much more information, it’s possible to manipulate the contrast in highlights and shadows in a way that is not possible with film capture, and is pretty limited for 8-bit capture. So this “tone mapping” effect has become a popular use for HDR images, but it’s not the only way to render them. 

    You can get that “HDR look” even from a single capture, if your editing tools allow for tone mapping.

    In fact, HDR capture was first pioneered for movie production where, for instance, it was important to show detail inside a room and outside when looking through a window. HDR capture allows you to create a balanced and natural looking rendering of each as shown below.

    Most digital cameras can now capture raw images in at least 12 bits per channel. This means that most raw image software provides some level of HDR functionality, even with single captures. 

    Multi-capture HDR can be used to capture tonal range that is outside the sensor’s native capability, as in these two photos. It can be rendered as a “normal” looking photo on the left, or local contrast and tone mapping can be used to produce a more dramatic rendering style, like the photo on the right. Of course, many people take this technique much farther than shown here. 

    Making use of bit depth 

    Here are some rules of thumb regarding bit depth: 

    • Capture in a high bit depth, typically as high as possible. This provides as much raw material for color and tones as possible. Use multiple image capture if you need detail that cannot be captured in a single image. This is most appropriate for use on a tripod to photograph subjects that are not moving. 
    • Edit in a high bit depth to preserve this additional information, and to ensure the highest quality image. 
    • Output in 8-bit as a general rule since that’s what most devices are designed to make use of. If your printer can make use of 16-bit images, then you should output in 16-bit. 
  • Color Profiles

    In this post we examine  color profiles, which are specific flavors of a color model. 

    Each color model describes a method to turn colors into numbers. But within each of these color models, there are different ways to calculate the numbers. In order to know the precise color that a numerical value represents, you need to know which method was used to do the calculation. The International Color Consortium (ICC) has standardized these methods as color profiles. This helps to ensure that color is consistent from device to device. Here’s how it works:

    You can view profiles in Photoshop, but also directly in Mac and Windows OS. In Windows, select an image and go to Properties>Details. On Mac, select an image, open Preview and  go to Tools>Show Inspector. 

    When an image is made, it must be tagged with a color profile to indicate how the color was encoded. The color profile tag lets the computer know how to decode the color properly. If there is no tag, then the application or device will not know precisely how to interpret the color, and will just have to guess what the numbers mean. Given the number of different color profiles in existence, it’s likely that the program will guess wrong. The figure below shows how the same RGB numbers produce different colors depending on which profile interprets the values.  

    RGB color values don’t mean one specific thing unless they are tagged with the encoding profile. When decoded with the wrong profile, you get a different result – sometimes a very ugly and obvious difference. Tagging your images with a profile lets the color be interpreted consistently.

    Chain of Custody

    In order to get the color right on the computer, there has to be a color information “chain of custody” that goes something like this: 

    • The file must have an indication of what color space was used when it was created – a color profile. You can save this information as a tag that names the profile for commonly used ones, or you can embed the entire color profile in the file. 
    • A program that opens the file needs to know how to use the color profile to properly interpret the colors for each pixel. 
    • When an image is displayed on a monitor, the computer’s graphics driver compensates for imperfections in the device by factoring in the monitor’s profile. So, for example, if your monitor makes shadows too blue, this profile can take some blue out of the darks. 
    • Every link of the chain must be present or it will be broken. Just like, well, a chain. 

    Commonly-used profiles 

    While there are a lot of profiles to choose from, there are a handful of ones that are most common. Here’s a list of typical color profiles and what they’re useful for. 

    sRGB

    This profile is designed to mimic “typical” monitor color (in 1999). In most cases, it’s the right choice for image output that will be posted to websites or be sent out to consumer photo labs. It’s also the right profile any time you are sending images to people who don’t understand color management. It does not contain as many colors as the other RGB profiles listed below. 

    sRGB is typically considered a “delivery” profile and may be applied as files are prepared to be sent or posted to the web.

    Adobe RGB (1998)

    This is a “wider” profile than sRGB, meaning that it contains more colors. It is useful for both 8 and 16 bit-per-channel images (see Friday’s post). Note that when images saved with the Adobe (1998) color profile are viewed on a monitor that does not use color management, the images will look flat and dark. This makes it a poor choice for posting images to the web for a general audience or sending images to people who don’t understand color management. 

    Adobe RGB is typically considered to be a “working” profile that is used in image editing. It is also used when delivering images for high-quality reproduction, such as commercial or fine art printing. 

    ProPhoto

    This is a profile which is designed as a “working” color space. It has a very wide color gamut, and can describe all colors that can be seen by the human eye (as well as many colors that can’t be distinguished). ProPhoto should only be used for 16-bit images, and in most cases, the file should be converted to a different color space for delivery of final images. 

    ProPhoto should generally be used only as a working profile. It should only be used as a delivery profile when it has been clearly specified by the recipient. 

    CMYK GRACoL

     If you are responsible for creating a CMYK conversion for commercial printing, then GRACoL is usually the best choice unless the printer specifies another or sends you a custom profile to use. 

    Gray Gamma 2.2

    When working with grayscale images, use a wide gamma for your editing profile. Gray Gamma 2.2 is a good generic choice. 

    Matrix profiles vs. LUT profiles 

    Some color profiles are based on mathematical formulas. These profiles are typically standardized ones like the ones listed above. Because these are standard profiles, it’s usually sufficient to tag the file with the profile name. ICC compliant software will typically already contain standard profiles. However, there’s generally no harm in embedding the profile to be sure it’s available. 

    There are also profiles that are created by measuring the color response of a device, which then save the results in a table. These profiles are called LUTs, which stands for Look Up Tables. LUT profiles are typically used to characterize specific devices like monitors, scanners and printers. 

    Since LUT profiles are unique, they must be embedded in order to be used. In most cases, it’s better to convert images with LUT profiles to one of the standard profiles before any type of delivery.

    In Friday’s post, we will look at bit depth and how it relates to color reproduction.

  • Understanding Color in Digital Images

    This week, we’ll be looking at the way color is represented in digital images. Proper digital asset management requires that color is handled properly so that files reproduce predictably. 

    At the heart of digital imaging is the translation of visual information into numbers. Digital images are basically a rectangle of dots, each representing a color or tone, commonly referred to as a bitmap or a pixmap. There are certain characteristics of a bitmap which are common to most traditional digital images. These characteristics include the color model, color profiles and bit depth. Let’s look at these. 

    Color models

    There are a number of different ways of turning color into numbers. Some use the physics of light waves, some rely on the way the eye perceives color, and some are built around the way ink combines to create colors. Each of these color models is useful in different ways. The vast majority of computer-based digital images use the RGB model. 

    Let’s look at some of the options.

    Indexed color 

    The earliest digital images were often made with indexed color. In this arrangement, the color for each pixel is chosen from a list of possible colors. This can range from 1-bit (two colors, usually pure black and pure white) up to a 8-bit color (256 distinct colors). Indexed color is very economical in file size, but it does not do a very good job rendering photographic images. It was soon replaced with RGB color as a standard method. 

    RGB 

    RGB is a color model that employs the three primary colors of light: red, green and blue. These can be mixed to make all other colors. Conventional RGB digital images will assign a numerical value for red, green and blue for each pixel. The table below shows examples of the relationship between RGB values and the colors that are produced. 

    RGB is the native underlying color model for most digital cameras, computer monitors, and lots of image editing software. There are a lot of variations of exactly how to implement an RGB color space, as we will see in the next post.

    Here’s a diagram that simulates RGB color. As you add one color to another, the resulting color is a brighter combination of the two. When all three colors are added together, you get white light. This is often referred to as Additive Color.

    RGB values can define every different visible color. The higher the number, the brighter the particular color. This chart shows some sample colors and their RGB values. 

    Grayscale images

    In addition to RGB, it’s also very common to run across grayscale images: ones that have brightness information, but no color information. In a grayscale image, each pixel can have a value from black to white. Grayscale is often used for black and white imagery (but RGB color is also frequently used). Grayscale is also be used for alpha channels and masks. 

    CMYK color  

    Commercial printing, like that which is used for books and magazines, is typically done with a combination of cyan, magenta, yellow and black ink. The first three are the primary colors in pigments, and black is added for extra punch, since it’s difficult to get a deep black with CMY inks. 

    CMYK color is, therefore, a color model that is useful for preparing images for print reproduction. In CMYK color, the numbers appear to run in reverse compared to RGB. Low numbers indicate less ink, so they describe lighter colors. And high numbers indicate a lot of ink and therefore darker colors. 

    Because it has four color channels instead of three, a CMYK version of an image is 1/3 bigger than an equivalent RGB image.

    Because it has four color channels instead of three, a CMYK version of an image is 1/3 bigger than an equivalent RGB image. 

    Here is a simulation of CMYK color. Since ink absorbs light, as you combine the color together the resulting color is darker. This is the opposite of RGB color and is often referred to as Subtractive Color. 

    Other color models 

    There are a number of other color models, including CIELAB which is modeled on the physiology of the human eye and YCbCr which is used for video. Click the links to read more about these.

    In the next post, we will look at color profiles, which are specific flavors of the color models described above.