Creative
Colorizing With Canvas
by Tom Coates
:::
Date Posted: 09/14/2001
- This tutorial will describe some methods of using Canvas for generating paint
objects with unusual colorizations. The techniques can be used in a variety of
ways, including the generation of natural looking marble-like textures, and
intricate kaleidescopic patterns. The basic idea is to transform a continuous
tone, grayscale image into a colored version, with variously colored
transfer functions. Dont worry about that technical term. The examples
will make things pretty clear, I hope. Initially I'll show the technique using
the Adjust Curves function. Then I'll give a short description of how the same
effects can be achieved using DuoTone images.
First let's talk about the
Adjust Curves function. This function (available from the menu
Image>Adjust>Curves) allows you to modify an existing colored or grayscale
image by defining a curve I'll call a transfer function. What this means is that
every pixel in the image is transfered to the result with a new brightness
value, depending on the shape of the curve you draw. I'm not going to spend much
time explaining the customary uses. But here are some examples. The target image
was an embossed and blurred letter T (as shown under Linear).


A Linear transfer function does nothing. Dark areas are
transformed into dark. Light into Light.
With an Inverse transfer
function, dark colors are transformed into lighter ones, and vice-versa. This is
the same as using the Image>Adjust>Invert function.
The Gamma
example shows a gently curved function which could be useful in touching up a
photograph with a very wide tonal range. This curve would brighten the shadows
while compressing the highlights.
One very important thing to note about
Curve Adjustments. You can save a particular setting of the adjustment controls.
Thus, if you find yourself using the same settings over and over, you can save a
template for those settings in a file. This prevents you from having to redraw
the curves every time. Instead you can just load in the shapes you used
previously. Both the store and load functions are available from the Adjust
Curves palette.
On Grayscale images, there is only a single color
channel, and the Adjust Curves function operates on that channel. If the image
has RGB color channels then you can actually adjust things four ways. The
overall brightness is controlled in the RGB channel but you can also make
individual adjustments in the Red, Green or Blue channels. This could be useful
if, for instance, you had a scan of an old photograph where the cyan dyes had
faded much more than the others, and you wished to brighten some colors without
affecting the rest of the image. This would be similar to an
Image>Adjust>Color Balance operation.
That's enough background on
the standard uses for Adjust Curves. Now let's get creative. Normally one uses
smoothly varying transfer functions that are only moderately curved. But nothing
says that you have to do that. By making crazy transfer functions, you can
create false textures and false colors in unusual ways.
Here's what
happens with the grayscale embossed T when you apply a rippled transfer
function. The gradual shading transitions are transformed into rippled edges.
The resulting object can then be embossed on another background using the
Hardlight Transfer mode.
Things get
even wilder when you apply different transfer functions to the separate color
channels. Here I blurred the original T a bit more and converted the
grayscale image to an RGB image. Then I adjusted the curves separately for each
color channel. Afterward I selected and erased all areas that had remained gray.
There's nothing to stop you from making the transfer functions
discontinuous, clipped, and really distorted. This sort of thing is quite
interesting when applied to a grayscale image generated by the Render>Clouds
filter. To make this work well, I find it best to render the clouds and then do
an Adjust>Levels>Auto adjustment to get a wider range of tonal values in
the clouds. For example, here I've defined a Curves Transfer function that has a
jagged function in the Green channel. Both the Red and Blue channels have solid
curves at 100%. So regardless of what gray level comes in, every result pixel
will get 100% Red and 100% Blue. But the Green channel varies all over the
place. Lots of green turns some areas white. Less green lets the Blue plus Red
show through, giving magenta-to-pink tones. The alternating sharp edges and
smooth slopes transform the smooth clouds into sharp edges and colored
gradients.
Alterations to the other color channel curves give
wildly varying results. Here are some samples. (Sorry, documenting the curves
for each of them would take too much space. Experiment on your own!)
It's important to keep in mind that if you find a Curves
adjustment that you really like, you can save its settings. That will let you
repeat the same colorization later, or make some little change if you want to.
DUOTONES
As I was playing with these crazy Curve adjustments,
I was frustrated a little bit by the inability to go back and make minor
adjustments to the original object. Once I colorized the images, I couldn't, for
instance, easily regenerate the clouds to get a better pattern. Also, composing
everything from the RGB channels made it difficult to figure out exactly what
colors I was going to get. Somewhat by chance I discovered that a conversion to
a Duotone image format solved a lot of these problems, AND led me to another
wonderful method of generating patterns.
First a warning - I think this
is an advanced technique. At least, it was for me. I'm not going to spend a lot
of time on the details here. My intent is to indicate an interesting direction
for experimentation by interested parties.
I started down this path when
I accidentally generated a grayscale image that looked like an Agate texture. I
had rendered some clouds and then applied the first rippled curves function
mentioned in this article.


I thought,
"this is cool. I wish I could colorize it easily to make it look more real." I
tried doing that several different ways and then finally remembered the stuff in
the manual about Duotone images. I never had a need for them before. Duotones
are a method of applying colors to grayscale images, based on - guess what -
transfer functions. You get to pick up to 4 colors (full RGB colors, not just
red, green and blue) and then provide a transfer function to paint that color in
areas of the final image based on the gray level in the original. This took a
bit of getting used to. After a lot of messing around I found that I could
colorize the gray images in any number of ways. Here are some samples They were
all derived from the same rocky grayscale image shown above.
Those were cool enough to justify all of the work I'd done. But then I
realized that I still needed that extra step where I had to Adjust Curves on the
original gray clouds. Too many steps if I wanted this to be easy. I figured that
I could build that transfer function into the Duotone curves. This worked really
well, especially with wildly rippled Duotone curves.
Several
points are worth mentioning. First, you can adjust the inks and curves any time
you want. Just use Image>Modes>Duotone Inks to get the palette back. Any
changes will be reapplied to the original grayscale image. You can save a
Duotone specification to a file, so you can use it in another document. Best of
all, the original grayscale image is still lurking underneath the colorization
and you can still operate on it. For example, AFTER you colorize, you can click
Render Clouds as many times as you wish until you get a texture you like. The
colors are reapplied automatically. You can even modify the Duotone image, with
several types of filters (like Gaussian Blur), or adjust the levels, contrast
and brightness, all with interesting results. You just have to try it! Trust me.
For my final demonstration, here's what this all led to. I wondered how
crazy DuoTone curves would affect grayscale images that had more form than
randomly generated clouds. So I generated an image of a vector object, rendered
it, and started playing. The first three images are at half scale but the final
one has to be seen at full size to appreciate it.
I started with a
twelve point multigon. This was given a grayscale Neon stroke and rendered. The
result was Gaussian Blurred a bit, and then colorized with a Quadtone (four
colors) using some crazy curves. Actually, the last two steps occurred in
reverse order: Colorize then Blur. That let me pick just the right amount of
blurring to get the best effect.
And here's
the result:
It was incredibly fun playing with this image. Tiny
adjustments to the Blur, or contrast, or brightness produced beautifully varying
patterns, much like an electric kaleidescope.
Now you know what I did on
my summer vacation. I hope yours was just as much fun. I realize that there's a
lot of information covered in this article, and that I've skipped a lot of
stuff. I welcome your questions about any details you may be interested in.