User Interface Design and the Importance of Color for .NET Database Systems
- Understanding Color
- Using Color
- Color Models
- Color in the .NET Framework
Since humanity began, we have been using the intrinsic colors of objects in the natural world. The artists of Altamira and Lascaux used ochres, colored earths, to draw their magnificent animals some 20,000 years ago. A now-extinct shellfish provided the dye used for the purple stripe on a Roman senator's toga. The blue robes of Sandro Botticelli's gentle Madonnas are tinted with ground lapis lazuli, a blue stone.
In this chapter, we move from typography to color theorycolor's characteristics and interactions. Ultimately, of course, color is all about light, and the way our eyes react to it. The human eye can distinguish upwards of ten million distinct colorsa huge problem space that any systems analyst will tell you must be structured and organized.
This is what color theory does. However, traditional color theory is based on the mixture of pigments, while the display of color on a computer monitor is a mixture of light, which, as we'll see, is slightly different in its details.
The first two sections of this chapter deal with traditional, pigment-based color theory without translation. In designing color for your user interfaces, it's traditional theory that must guide you. The next section looks at the differences between color models, including the ARGB model used on computers, and finally, the last section looks at the .NET Framework objects used to manipulate color.
Come on, admit it, it's a lot more fun than memory allocation models (or at least no more tedious).
Understanding Color
Like the other graphic elements that we're examining in this first part of the book, there's a set of terms that folks in the field use to talk about color, and we'll examine them here.
The Dimensions of Color
Every color can be defined along three dimensions: hue, saturation, and value. Hue is what we normally think of as the color itselfred, yellow, or puce. Value is the relative lightness or darkness of a colorpink or magenta.
Saturation is measure of intensity, which is a function of purity of hue. If you mix equal amounts of the three primary colors, the result is gray. Imagine a gradient with a pure hue on one end and gray on the otherthat's a measure of saturation.
The color wheel is a useful starting point for working with color. There are actually quite a few different configurations of color wheels, and we'll look at a couple others in this chapter, but the one shown in Figure 4-1 in the color insert, is the most common.
Figure 4-1 Basic Color Wheel
The three colors that cannot be created by combining other colors yellow, red, and blueare the primary colors. Secondary colors, created by mixing two primaries, are placed between them on the wheel. For example, green is the mixture of blue and yellow.
As shown in Figure 4-2 in the color insert, the wheel can be further refined by including the tertiary colors such as red-orange or blue-green, which are mixtures of a primary and secondary color.
Figure 4-2 Tertiary Color Wheel
You may be thinking that there are some colors missing from the color wheelblack, white, gray, and brown, often called the neutrals. In fact, black and white aren't technically colors. If you think of light, of course, black is its absence and white its presence.
You might expect that mixing the three primary colors would result in white. In reality, the result is gray. (You can also get gray by mixing black and white pigments, of course, because neither color, as a pigment, is a pure color.) Black and white are effectively primaries because they can't be mixed from other pigments.
They can, of course, be mixed with other pigments. When you mix a pigment with white, the result is a tint. When you mix a pigment with black, the result is a shade. If you add both black and white to a pigment, the result is a tone.
The other neutral is brown. Every time I've taught color mixing, somebody asks how you get brown. It is difficult to look at the color wheel and see how you could possibly arrive at such a distinctive color. So, here's the secret: Brown is a shade of orange, while beige is its tone.
Colors have one more characteristic that deserves mentioning: They are either warm or cold. The warm colors, as shown in Figure 4-3 in the color insert, are in the red-orange range, while cool colors are in the blue-green range.
Figure 4-3 Warm and Cold Colors
Conventional wisdom has it that warm colors advance while cool colors recede, and while there's truth to that, it tends to be more important when you're painting walls than designing user interfaces. There's a big difference between the effect of an 8-foot wall and an 8-inch screen.
Color Harmonies
There is, of course, no limit to the number of effective color combinations, but that knowledge isn't much help when you're faced with designing a color scheme. Not to fear; there are traditional systems to help you organize your work.
The physical relationship between colors on the color wheel is the basis of traditional color systems, called color harmonies. Color harmonies are often referred to as color schemes, but that's not correct. A color scheme is simply the colors used in a project. A color harmony complies with one of the relationships described here.
A monochromatic color harmony uses a single color, perhaps with the addition of black and white. Monochromatic harmonies are obviously the simplest to implement. Pick a color you like, use its tints, shades, and tones, and away you go.
Like a document that uses a single typeface, monochromatic schemes are generally safe, slightly formal, and can be invisible. Sounds boring, but if you're building a data entry system, invisible is a good thing.
Invisible color schemes can be a good thing.
Analogous color harmonies are also fairly easy to use, but a bit more vibrant. As shown in Figure 4-4 in the color insert, an analogous harmony uses a primary hue along with one of its secondariesblue and green in the example shown. Analogous harmonies may also include the intermediate colorsblue-green in the example.
Figure 4-4 An Analogous Color Harmony
Analogous color schemes can be beautiful, but you must be careful to maintain enough contrast. Green text on a blue background is going to be pretty close to unreadable. But, dark green text on a pale blue background can be quite pleasant.
Make sure you have enough contrast when choosing an analogous color scheme.
A triadic color harmony, shown in Figure 4-5 in the color insert, combines three equidistant colors, either the three primaries, the three secondaries, or three tertiaries.
Figure 4-5 A Triadic Color Harmony
Triadic color harmonies tend to be quite vibrant, even if you use pale or unsaturated versions of your hues. To use a triadic harmony successfully, you need to balance the three colors very carefully, using only small amounts of two of the colors, for example.
Complementary colors are directly opposite each other on the color wheel, as shown in Figure 4-6 in the color insert. Complementary colors have a special relationship. You've probably done the exercisestare at a square of green for a few seconds and then look at a white wall. You'll see an after-image of red. Red and green are, of course, complementary colors.
Figure 4-6 Complementary Colors
Balance triadic harmonies carefully.
If you put two complementary colors side by side, the edges tend to vibrate. So, for example, if you choose a text color that's the complementary of the window background, the text will start to move around on the screen. (Try it. It'll make you homesick for the sixties.)
Use your main color's complement as an attention-getter.
Complementary colors are tricky to use in large doses, but using a color's complement is an excellent technique for drawing attention to an area of the screen.
Complementary color harmonies can also work if you contrast the value and intensity of the two colors. Maroon and pale green, for example, are a classic Art Deco combination, and can work even for text and background, at least in relatively small doses.
The final classic color harmony is the split complementary, which combines one color with the two colors on either side of its complementary, as shown in Figure 4-7 in the color insert.
Figure 4-7 Split Complementary Color Harmony
The split complementary harmony is a good choice for polychrome schemes because it's so hard to mess up.
The split complementary harmony sounds tricky, but is actually difficult to mess up, which makes it a good, safe choice for polychrome color schemes.
The split complementary is one of my favorite harmonies. A color scheme based on the split complementary is colorful, but hardly ever loud. It might not be the best choice for straight data entry applications, where efficiency is more important than appearance, but remember that any color harmony can combine black and white for its text display.