8.5 The Selected Style Indicator: Color Gestures

Apart from the right-click menu commands, the selected style indicator has a convenient method for quick adjustment of colors: color gestures (see Figure 6 on the color insert).

To use color gestures, grab the fill or stroke color swatch and drag it as described below. Note that this only works when the swatch displays a flat color; it does not work for a swatch showing None (i.e., no paint), N/A (i.e., nothing is selected), or displaying a gradient (although you can select one or more gradient stops in the Gradient tool and color-adjust them by color gestures just as you would with objects).

Color gestures work in the HSL color space. Dragging without any keyboard modifiers adjusts the hue channel, dragging with adjusts saturation, and dragging with adjusts lightness.

The adjustment is done by “rotating” the color swatch away from the original direction, which is assumed to be 45 degrees to the northeast, that is, from the swatch diagonally into the document window. Once you click and drag the color swatch, imagine a diagonal line going from the point where you clicked in the northeast direction, across the entire Inkscape window. By dragging below or to the right of that line, you decrease the corresponding color channel, down to the minimum at the lower edge of the window; by dragging it above or to the left, you increase it, up to the maximum at the left edge of the window. If you hover your mouse exactly over the 45-degree line, the change will be zero.

The mouse cursor changes when you’re doing color gestures, reflecting the channel currently being adjusted, and indicating the directions for increasing and decreasing the value. Also, watch the status bar, which will indicate, as you drag, the channel you are adjusting, the original value of that channel, the new value, and the difference.

The angular nature of this adjustment means that you can easily vary the precision of the change. If you drag close enough to the swatch, any small movement results in a big change of the color. If you need a finer adjustment, just drag farther away from the swatch, toward the center of the Inkscape window or even to its upper-right corner, where the same movements will produce very small changes in the color.

You can switch channels while you drag—that is, you don’t need to drag from the swatch again and again if you want to adjust all three channels. You can do it all in one drag, by pressing and releasing and as necessary. Note that when you change the keyboard modifiers during drag, the zero-change line is temporarily rotated to go through the current mouse position; this is done so that there are no sudden changes in color if you are switching modifiers away from the original 45-degree line.

The modifier is special. Pressing means “do nothing”; this allows you to move the mouse, without releasing, to a more convenient place from which you can continue tweaking the color after letting go of . As with the other modifiers, releasing temporarily redefines the zero-change axis to go through the point where was released. For example, imagine you made your color darker by -dragging toward the bottom edge of the window, and you now need to make it less saturated. You cannot, however, -drag it any lower because there’s not enough room for that. In that situation, without releasing the mouse, -drag it upward to a convenient spot and then -drag downward as needed. Also, you can start dragging from the swatch while holding down to avoid any change of the color until you take a more convenient position for adjusting it.

For example, you can select a green rectangle and first turn it into a greenish-blue color by dragging away from the fill swatch and slightly above the 45-degree line; then, without releasing the mouse, press and drag a bit to the right to darken the color; then press , release , and adjust saturation. You can press or release and as many times as necessary during a single drag; when you are finally satisfied with your color, release the mouse to commit the change.

Apart from precise adjustments, you can use color gestures to very quickly perform some common color transformations:

Note that when several objects or gradient stops with different colors are selected, the selected style indicator shows their averaged color. If you adjust that color by gesturing, the changed color will be assigned back to all selected objects or stops, in effect eliminating any difference between them. If you want to adjust many different-colored objects preserving their relative differences, use the color modes of the Tweak tool (8.7 Color Tweaking), color adjustment extensions (8.8 Color Extensions and Filters), or color filters (17.3 Preset Filters).