There are a variety of reasons why a style image doesn’t work with a source image. One of the most common is that the two images are composed of very different color palettes and/or luminance values.

To get a better sense of how two images differ in terms of colors and value scale, we can analyze the colors and shades of both images using a color histogram. But first it’s important to understand what the color histogram analyzes and represents about your image.

What is a Histogram?

A histogram is a graphical representation of the number of pixels in an image. In a more simple way to explain, a histogram is a bar graph, whose X-axis represents the tonal scale (black at the left and white at the right), and Y-axis represents the number of pixels in an image in a certain area of the tonal scale. For example, the graph of a luminance histogram shows the number of pixels for each brightness level (from black to white), and when there are more pixels, the peak at that specific luminance level is higher.

In photography, the histogram is used as a reference to help you understand the levels of light and color in a particular image. Analyzing image exposure is usually the primary reason for referencing a histogram. The way a photograph's histogram is laid out, you can quickly grasp what's going on with the image's levels of black, shadows, midtones, general exposure, highlights, and white. Any savvy photographer can tell from a glance at a photo's histogram whether the image is overexposed, for example.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/47f6fefb-97b9-4de0-9b49-8e77fa17c90b/71170C59-1B1E-4981-B241-C8ED6A72BC6C.jpeg

If you look at the graph in the luminance histogram above, you'll see vertical lines that delineate these levels of a particular image. As the white bar flows horizontally across the histogram, it lets you know that the image hits the marks for all the levels previously mentioned. The higher the peak, the more intense the particular level is in the image.

What is a color histogram?

A color histogram of an image represents the distribution of the composition of colors in the image. It shows different types of colors present and the number of pixels in each color's channel. The relation between a color histogram and a luminance histogram is that a color histogram can be also expressed as three luminance histograms, each of which shows the brightness distribution of an individual Red/Green/Blue color channel.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0b7d00bf-2065-48f8-a430-bc7c6ca6b050/D5C238AE-B588-4932-85C1-EB7BF71C2AB0.jpeg

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/27b73e8b-016c-4407-89ea-a84df506bd80/719304D6-B126-4EED-A183-B081508D3720.jpeg

RGB is an additive color space - that is, its three primary colors (red, green, and blue) combine additively to produce any desired colors. Each of the component colors is represented by a number from 0 to 255. Black has an absence of all 3 colors, while white contains all three in equal levels.

Much of the software aimed at professional photographers feature some sort of built-in color histogram visualization, including Adobe’s Photoshop, Lightroom Classic and Lightroom CC, and Apple’s Aperture.

Photoshop's Histogram panel allows you to view red, green, blue, and luminance separately if you select "All Channels" mode, seen here.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c93b8ec7-50b2-440c-b246-86af5be0050b/ScreenShot2018-06-15at2.32.33PM.png

But you don't need expensive graphic software to play this game. One free option for this visualization is this LunaPic color histogram feature, pictured here.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3c7101c3-1b19-4ba4-acbe-2891bb6a97d8/19B7005C-8220-495D-A348-43B4BA0BE378.jpeg

Okay, What Do I Do With This Information?

Once you understand what the color histogram is telling you, you can use it to assess similarities in colors and luminance between your photos and style images; when you want to improve the compatibility, you can manipulate the style image to better match the values of your source image.

For example, if your color histogram analysis reveals that your style image has far less blue but far more red than your source image, you could boost the red channel while reducing the blue channel of the image using Photoshop's Curves or a tool like Lunapic’s Adjust Colors tool.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0a25da89-0ef1-4f27-ba4e-4a0383e52b1d/ScreenShot2018-06-15at2.41.17PM.png

Photoshop's Curves tool can allow you to "massage" RGB and luminance levels using curves to shape its changes.


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/af4f91a2-7805-42ff-9d7d-48f041a43027/ScreenShot2018-06-15at3.38.12PM.png

Lightroom CC gives you many ways to view and shape color and luminance values- including the ability to use, preview, and recall "presets" containing curves information.

LunaPic.com Photo Editor Adjust Colors tool

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6f98e669-0999-45f6-9386-62736bf370fe/AD4E0307-46A7-466B-A97F-D5626761524D.jpeg

Just one of Lunapic's many free color manipulation tools. See the list at https://www298.lunapic.com/editor/?action=adjust-menu.


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3a4c6fd2-91cd-4f24-9af5-9de90688749d/ScreenShot2018-06-15at3.00.07PM.png

Many tools also include features allowing you to boost or reduce shadows and highlights for red, green, blue, or all three. Google Photo's "Adjust" options are pictured here.

Things to look out for when you’re adjusting your style images

Boosting brightness by too much can cause things to look washed out. That is because you’re trying to boost values that are already maxed, and is the same effect as an overexposed photo. Make sure that you never attempt to boost luminance/exposure/brightness beyond the levels contained within the histogram, because you’ll end up “clipping” those values (similar to audio clipping when it is recorded too loud).

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6c93a6a6-0482-47b0-afeb-2b9352d75ab5/Screen-Shot-2018-06-15-at-3.24.56-PM.png

The histogram pictured shows what it looks like when an exposure is set too high and the brightest values are washed out. Notice all the color values clustered at the top right of the graphs.

The same principle is true for reducing brightness... reduce it too much and you'll muddy the blacks.

Any other suggestions for things to watch for? Leave a comment, and I'll update the article.