next up previous

The Color Editor

Figure 5 XV Color Editor

The XV color editor provides a powerful system for manipulating color images. Since there are many different reasons why one might want to modify an image's colors, and many different types of images that may need modification, there is no one color manipulation tool that would be `best' for all purposes. Because of this problem, XV gives the user three different color tools, all of which can be used simultaneously.

These three tools are tied together in a fixed order. The Colormap Editing tool operates on the original colors in the image. The output of this tool is piped into the HSV Modification tool. Its output is piped into the RGB Modification tool. The output from the RGB Modification tool is what actually gets displayed.

Colormap Editing Commands:

The Colormap Editing Tool

The top portion of this window shows the colormap of the current image. There are 16 cells across, and up to 16 rows down, for a maximum of 256 color cells. Only cells actually used somewhere in the image are shown in this array.

The currently selected color cell is shown with a thick border. You can change the selection by clicking anywhere in the array. If you drag the mouse through this area, you'll see the dials at the bottom change to track the current pixel values. You can also select a color cell by clicking anywhere in the image window. Whichever pixel value you were on when you let go of the mouse will become the new selected color cell.

You can define a smoothly gradated range of colors by Left clicking on the color cell that marks the `start' of the range, and Middle clicking on the color cell that marks the `end' of the range. Intervening color cells will be interpolated between the colors of the `start' and `end' colorcells.

Using the Dial Controls

At the bottom of the Colormap Editing tool are three dials that let you set the color of the current color cell (or group of cells). By default, the dials control the Red, Green, and Blue components of the RGB colorspace, but they can also control the Hue, Saturation, and Value components of the HSV colorspace. (The RGB/HSV button controls this.)

Regardless of what they control, all dials in XV work the same way. Clicking on the single arrows increase/decrease the value by 1. Clicking on the double arrows increase/decrease the value by a larger amount (16 in this case). If you click on one of the arrows, and hold the mouse button down, the increase/decrease will repeat until you release the mouse button.

You can also click in the general area of the pointer and simply drag it to the position you want. The further your mouse cursor is from the center of the dial, the more precise the control will be. While dragging, you do not have to keep the cursor inside the dial window.

The HSV Modification Tool

There are four separate controls in the HSV Modification tool. At the top of the window are a pair of circular controls that handle hue remapping. Lower down is a circular control that maps `white' (and greys) to a specified color. There is also dial control that lets you saturate/desaturate the colors of the image. Finally, at the bottom there is a graph window that lets you modify intensity values via an arbitrary remapping function.

Hue Remapping Controls

These two dials are used to define a source and a destination range of hue values. Every hue in the source range (defined in the From dial) gets mapped to the value of the corresponding point in the destination range (defined in the To dial).

Each dial has a pair of radial lines with handles at their ends. Between the two lines an arc is drawn with an arrow at one end. The wedge drawn by these lines and the arc defines a range of values (in degrees). The direction of the arc (clockwise, or counter-clockwise) determines the direction of this range of values (increasing or decreasing).

Distributed around the dial are tick marks and the letters `R', `Y', `G', `C', `B', and `M'. These letters stand for the colors Red, Yellow, Green, Cyan, Blue, and Magenta, and they show where these colors appear on the circle.

The range is shown numerically below the control. By default the range is `330 degrees, 30 degrees CW'. This means that a range of values [330 degrees, 331 degrees, 332 degrees,... 359 degrees, 0 degrees, 1 degree,..., 28 degrees, 29 degrees, 30 degrees] has been defined. Note that (being a circle) it wraps back to 0 degrees after 359 degrees.

The range can be changed in many different ways. You can click on the `handles' at the end of the radial lines and move them around. If you click inside the dial, but not on one of the handles, you'll be able to drag the range around as a single object. There are also 5 buttons below the dial that let you rotate the range, flip the direction of the range, and increase/decrease the size of the range while keeping it centered around the same value.

In its default state, the To dial is set to the same range as the From dial. When the two dials are set to the same range, they are effectively `turned off', and ignored. If you press the Reset button that is located near the hue remapping controls, it will effectively disable the hue remapping by setting the To range equal to the From range.

Below the hue remapping controls are a group of `radio buttons'. You can have up to six different hue remappings happening simultaneously. Higher numbered mappings take precedence over lower numbered mappings.

The White Remapping Control

In the HSV colorspace, `white' (including black, and all the greys in between) has no Hue or Saturation components. As such, it is not possible to use the hue remapping controls to change the color of white pixels in the image, since they have no `color' to change.

The white remapping control gives you a way to add Hue and Saturation components to all the whites in the image. It consists of a movable point in a color dial. The angle of the dot from the center of the dial determines the Hue component. The distance of the dot from the center of the dial determines the Saturation component. The further the dot is from the center of the dial, the more saturated the color will be.

You can control the white remapping control in several ways. You can click on the handle and drag it around with the mouse. There are also four buttons provided under the dial. One pair allows you to rotate the handle clockwise and counter-clockwise without changing its distance from the center. The other pair of buttons lets you change the distance between the handle and the center without changing the angle.

The current Hue and Saturation values provided by the control are displayed below the dial. The first number is the Hue component, in degrees, and the second is the Saturation component, as a percentage.

There is also a checkbox that will let you turn off the white remapping control. This lets you quickly compare your modified `white' with the original white. You can also effectively disable the white remapping control by putting the handle back in the center of the control.

The Saturation Control

The saturation control lets you globally increase or decrease the color saturation of the image. In effect, it is much like the `color' control on most color televisions.

The saturation control has values that range from `-100%' to `+100%'. At its default setting of `0%', the saturation control has no effect on the image. As the values increase, the colors become more saturated, up to `+100%', at which point every color is fully saturated. Likewise, as values decrease, the colors become desaturated. At `-100%', every color will be completely desaturated (i.e., a shade of grey).

The Intensity Graph

The Intensity graph is a function that lets you remap intensity values (the Value component in the HSV Colorspace) into other intensity values. The input and output values of this function both range from 0 to 255. The input values range along the x axis of this graph (the horizontal). For every input value (point along the x axis) there is a unique output value determined by the height of the graph at that point. In the graph's default state, the function is a straight line from bottom-left to top-right. In this case, each input value produces an equivalent output value, and the graph has no effect.

There are a number of `handles' along the graph. These provide your major means of interacting with the graph. You can move them around arbitrarily, subject to these two constraints: the handles at the far left and far right of the graph can only be moved vertically, and handles must remain between their neighboring handles for the graph to remain a proper function.

The handles are normally connected by a spline curve. (Note that the x,y position of the current handle is displayed while the mouse button is held down.) The function will remain a smoothly curved line that passes through all the handles. You can change this behavior by putting the function into `lines' mode by pressing the second button from the top next to the graph (the top button will go back to spline mode).

The next two buttons let you add or delete handles. The third button will insert a handle into the largest `gap' in the function while the fourth button will remove a handle from the smallest `gap' in the function. You can have as few as 2 handles, or as many as 16.

The `reset' button puts everything back on a straight line connecting bottom-left to top-right (a 1:1 function). It does not change the number of handles, nor does it change the x-positions of the handles.

The `gam' button lets you set the function curve by entering a single number. The function is set equal to the gamma function:

y = 255 * (i / 255) ^ (1/ t)

where i is the input value (0-255), t is the gamma value, and y is the computed result (0-255). Gamma values (for our purposes) are floating point numbers that can range between 0 and 10000, non-inclusive. A gamma value of `1.00' results in the normal 1:1 straight line. Gamma values of less than 1.00 but greater than 0.00 result in `exponential' curves, which will dim the image. Gamma values greater than 1.00 result in `logarithmic' curves, which will brighten the image.

The RGB Modification Tool

The RGB Modification tool is a collection of three graph windows, each of which operate on one of the components of the RGB colorspace. This tool lets you perform global color-correction on the image by boosting or cutting the values of one or more of the RGB color components.

General Buttons

These buttons provide general control over the whole XV color editor window. You can display the image with or without color modification, save and recall presets, and undo/redo changes. Also, convenience controls are given for performing some of the most common operations on the Intensity graph.

Figure 6 General Buttons