Image Effects Image Effects by cecilia

Color Curves

If you wish to follow along with the tutorial, you will need to first download the tutorial file archive here:

Nothin' else is built the same!
Nothin' in the world...
has a soft and wavy frame
like the silhouette of a dame.

Or so say the sailors in South Pacific. This has nothing to do with Color Curves (get it...CURVES), but I thought it would get everyone in a happy mood.

Color Curves are a basic image processing effect. Basic, but very powerful. When you look at any image, what are you really seeing? Physically, you are looking at a range of dark to light-tones. Yes, conceptually, there's a lot more going on; but, for this article I'm only going to speak of these tones. Most color pictures have some shadows, some mid-tones and some highlights. The proportions will differ; but, a range of tones tends to exist. Now, here's the fun part. What do you do when you want to change these tones? Change only some of them and leave others alone? Or, change only the tones in one channel? It's Color Curve Time! That's right boys and girls - you too, can control your images with a simple tool, look like a genius and get away with it. It'll be our secret.

What Are Color Curves?

Flash back to your school days. The Nuns (I went to Catholic school) taught us about Cartesian coordinate space. That is, numbers defined in an X and Y graph. Any point in this space can be defined by it's location relative to the X (horizontal) number and the Y (vertical) value.

Cartesian.gif When you use the Custom Color effect in ImageFX, you are presented with a graph as shown here. I've added stuff to the graph so you can see the relationship between the X and Y values. Normally you don't see any numbers, or even any guide lines, just the shape of the curve (the yellow line on the left). The X-axis (red) represents the shadows, mid-tones, and highlights of the image you are examining. The values range from 0 (dark) to 255 (light) and describe the original, unchanged dark to light color tones in your image. The Y-axis (blue) indicates where these colors have been remapped along the same dark to light range.

A Color Curve shows the old values relative to the new, modified values - with the Input and Output values combined together. In the graph shown here, there are three points (black). The point at 0,0 (bottom left) represents the darkest of the shadow values. The point at 127,127 (middle) represents the middle of the mid-tone values. The point at 255,255 represents the highest of the highlight values. This graph isn't very "useful" because it doesn't change anything in the image. This is so, because the numbers for each point along the diagonal are identical in the X and Y-axis. PhotoShop lets you see the input/output numbers for each selected point. And while some may want something similar for ImageFX, I find it's more useful to see and alter the curve as I see fit. I know what the numbers mean. And hopefully, now, so do you. If you didn't quite follow that, read on, it should become more clear later.

Saved Curves

When you save a curve (the yellow diagonal line), it is saved as a standard text file. This means that you can look at it (or edit it) in a text editor. It will look something like this: (note that I've added comments to each of the lines to explain what each is)

2             it's a spline (points = 0, line = 1, spline = 2)
3             indicates there are three points in this graph
0             X location of 1st point
0             Y location of 1st point
127           X location of 2nd point
127           Y location of 2nd point
255           X location of 3rd point
255           Y location of 3rd point

Sample Color Curves


All of the curves described here are contained in the included tutorial archive so that you can use them with ImageFX. Curves are stored in ImageFX's Storage/Transform directory. I've put my curves in a sub-directory called ImageEffects which can be copied right into your existing Transform directory.

Okay, we need a good image to play with. I like using landscapes for illustrating color curves, because they usually have a wide and rich range of tones to play with. Here is a picture of the Culloden battle field in Scotland, which I got from a friend of mine who traveled there recently. This was where the Imperialist English tried to destroy the Scots in one of their many attempts at exterminating their northern neighbors. But, the Scots will have the last laugh because they are voting for their independence from their centuries old oppressors this year. This land is beautiful; but, alot of blood was spilt on that earth and the Scots do not forget. (There's no way I was going to be allowed use of these pictures without giving a brief history lesson!)

OK, on to Color Curves! Most of these are common ways of altering an image. The thumbnail images shown here may not show the effect very well. I encourage you to try these yourself, to really see what's going on.

Color CurveDescriptionAlteredOriginal

A-graph Lighter
Brightens the whole image while keeping the shadows dark and highlights bright.

This is what the Gamma setting in Balance does. Why have this effect in two places? Because the Gamma slider is a global control. It's basically a total increase or decrease of brightness. While it is certainly useful - I use it often - with a Custom Curve you can create an effect that only affects certain ranges or tones. If you want only the highlights to be increased or decreased, then a color curve is what you need to use.


For example, if you load Culloden.iff and unselect the Red and Green Channels, then increase the Blue level with Balance, it will give the entire image a blue haze. However, if you instead apply this color curve, it will brighten only the blue clouds. The comparison image at the left was made using a Box Region for the left half of the image and performing the Balance effect, then inverting the Region and applying this color curve to the right side. See the difference?

A Culloden

B-graph Darker
Darkens the image.
B Culloden

C-graph Mid_contrast
Shows the subtle effects that can be achieved with color curves. Here it adds contrast to the mid-tones while it deepens the shadows and brightens up the highlights.

As you begin to make your own curves, you will learn that the steeper the curved area gets, the greater the contrast in those tones. The curve between the second and third points is steeper than the part of the curve at either end. A flatter curve will reduce the contrast and that's what happening with the shadows and highlights here.

C Culloden

D-graph Mid_flat
Here you increase the contrast in the shadows and highlights. But you flatten the mid-tones.
D Culloden

E-graph Hi_bright
This one is, perhaps, a little deceptive. It brightens the highlights; but, it does it by ramping up all the other tones linearly. If you wanted to keep the shadow and mid-tone values unchanged, you would add a point in the middle and pull it back to the center diagonal, closer to that middle number, 127.
E Culloden

F-graph Hi_dull
Makes the highlights duller by ramping. Similar to Hi_bright; but, instead pulling the tones down.
F Culloden

G-graph Shadow_bright
Ramps the shadows brighter.
G Culloden

H-graph Shadow_dark
Ramps the shadows darker.
H Culloden

I-graph Affect_range
An example of keeping most of the curve straight; but, picking a small range and pulling it out. Try moving that little triangle of points down to near the shadows. Ooh, weird landscape! Spooky!
I Culloden

J-graph Negative
Negative will reverse the tones and the colors - what was once shadows is now light, what was blue is now yellow and so on. The Color Negative effect will give the same result.
J Culloden

K-graph Solarize
Solarize is defined as reversing the shadows while retaining the original hues. This shows what happens when you drastically change tone relationships. I am raising the shadows way up, making them like mid-tones. The highlights are lowered to be more like mid-tones and almost moving to shadows. A flip-flop is done with the mid-tones, so some are darker than others.
K Culloden

L-graph Solarize2
This one shows another drastic change in tonal relationship.
L Culloden

M-graph XFiles
If you wanted to create that X-Files look, this curve lets you up the highlights, while using the middle point to pull down the shadows and mid-tones past the center of the graph. The result is dark, gloomy and atmospheric.
M Culloden

N-graph Negative_Mid_contrast
What if you were to take the positive curves and translate them into their negative equivalents? This one is the reverse of the Mid_contrast curve.
N Culloden

Editing Curves

There's all manner of wacky curves that you can make. Take the Affect_range curve, for example. That one has one little spike in it made up of three points. One of the little annoying facts about the way Curves are made in ImageFX, is that moving a collection of several points is a bit clumsy. You have to move each point one by one. If you've already established an interesting design among several points you can't move the whole bunch all at once. It would be nice if we could. I, also, don't like the fact that it only adds (and deletes) points from the lower left corner. That means you have to add all the points you need first then start moving them around. It would be nice to add points where you want them and as you need them.

So far, I've only been using Spline-based editing, to create smooth transitions between tones, and Line-based, to make spikes and other sharp translations. But, ImageFX gives you a third type of editing, called Point-based. When this type of curve editing is selected you can just draw right in the graph box.

Have a look at these curves that come with ImageFX (all of which were made with Point-based editing): Threshold, Halve, and Contrast.

Threshold has a straight line drawn way down in the shadows (lower left) and a line up in the highlights (upper right). This forces all dark-tones to black and all highlights to white. In PhotoShop forcing the ends of the curve to pure black and pure white is called "clamping". I'm just telling you this so you don't feel left out of any secret Photoshop discussions. Halve is basically Threshold done just to the shadow-tones.

If you look at these two files in a text editor, you'll see that there are a lot of numbers. Point-based curves are - surprise - a list of a lot of points. I didn't bother to count them; but, in the Halve file, 50% of the values are 0 and then the numbers gradually go up. In the Threshold file, 50% are 0 and 50% are 255 (half black, half white, see?).

Take a look at Destroy. In this one, the points are all over the place, and that's what it does to your image...completely destroys the original dark to light relationship!

The reason the Curve graph comes up with Point-based as default is because you can do more intricate curves here. You can make little bumps here and squiggly things there and so on. The benefit is that you won't have that annoying problem with adding points that I described above.

Now, with all that technical stuff out of the way, it's play time...

Tutorial 1

CullodenX So let's take that landscape picture and do something really simple and cool.
How easy was THAT!?

Tutorial 2

CullodenY Let's try something a little more complex.

Now look at your picture. Feel free to use different curves than I have. Do you want more blue and less green? Change the curve. Or don't deselect the Red Channel. Whatever. This is your mud-pie. Play away!

Tutorial 3

Now, here's a spookie effect, that takes advantage of several features of ImageFX:

  • 1.Open

    Load Eyes.ingf into a new buffer. The background layer and the eyes layer are the same, for now - heh, heh, heh... evil laughter heard in the corner of the room. The middle layer is a mask which contains a simple horizontal black to white gradient. This is trick I've seen done in print ads. Very subtle transitions can be done just by doing an effect to the bottom layer and compositing both together.

  • 2. Select the Background layer, if it isn't already selected. Apply the Custom Color curve ImageEffects/Solarize2 or one of the Chrome curves.

    You'll notice something peculiar happened with the eyes (or actually, it doesn't). The top layer has an Alpha Channel in which the transparency is positioned over the pupils of the eyes. Because of that, anything you do to the Background layer will let those pupils come bursting through. This pupil thing I added just to be perverse. You can remove it if you don't want to make images that look like they came from The Exorcist.




I could go on and on... but, I have to end this sometime. Just remember:

Nothin' acts like a dame...
or attracts like a dame...
There ain't a thing that's wrong with any man here,
that can't be cured by puttin' him near...
a girly, womanly, female, feminine dame!

The complete contents of this site are unless otherwise indicated.
The contents may not be reproduced in whole or part, in any form, without prior written consent from cecilia. You have been warned ;)

Need help with this topic? Email Me

Back to