Sub topic 5
Value: how light or dark a color is
Prerequisites and scope
This chapter assumes you have read the earlier chapters on hue and saturation. It also assumes you know that screens mix red, green, and blue light, and that you can read short code snippets. It covers value as a property of a color. Later chapters cover tints, tones, and shades, and value contrast in layouts. They also cover how perceived lightness differs from the numbers, and contrast ratios, so this chapter only introduces those ideas.
What value is
Value is how light or dark a color is. It is the third property in the hue, saturation, value description. Hue names the color family, saturation says how pure or muted the color is, and value says how much light the color seems to carry.
Value runs from dark to light. At the dark end is black. At the light end is white, or, in some models, the brightest version of a pure hue. Every color has a value, including grays. A gray has no hue and no saturation, so value is the only property that separates one gray from another.
Designers also say lightness, luminosity, or brightness. These words overlap but are not always identical. This chapter uses "value" for the general idea. When a specific color model uses a different name, the chapter says so.
Seeing value without hue
The quickest way to judge value is to remove hue and saturation. Convert an image to grayscale. What remains is the value structure: which areas are light, which are dark, and how they are arranged.
Many designers do this on purpose. A design with good value structure still reads in grayscale. A design with weak value structure turns into a flat gray mass, even when its hues look very different on screen.
Try this check on your own work:
- Take a screenshot or export of your design.
- Desaturate it fully, using a grayscale filter or a "desaturate" adjustment.
- Squint at it, or blur it slightly.
- Ask which areas stand out and which fade together.
If two areas you wanted to separate look the same in grayscale, they differ only in hue or saturation. That is often too weak a difference for text, icons, or anything the viewer must notice quickly.
Value in the HSV and HSL models
Software describes value in two main ways, and the two differ.
In HSV, the third number is called V, for value (some tools call it brightness, as in HSB). V = 0 is always black. V = 100% is the brightest form of the color at its current hue and saturation. At full saturation, V = 100% gives the pure, vivid hue. At zero saturation, V = 100% gives white.
In HSL, the third number is L, for lightness. L = 0% is black and L = 100% is white, whatever the hue and saturation are. A fully saturated, pure hue sits at L = 50%, in the middle.
The table compares them for a vivid blue at hue 210 degrees.
| Model | Setting | Result |
|---|---|---|
| HSV | 210°, 100%, 100% | Vivid blue, the purest form |
| HSV | 210°, 100%, 50% | Dark blue |
| HSV | 210°, 0%, 100% | White |
| HSL | 210°, 100%, 50% | Vivid blue, the purest form |
| HSL | 210°, 100%, 90% | Very light blue |
| HSL | 210°, 100%, 100% | White |
The practical difference is this. In HSV, raising V to the maximum never makes a saturated color white. In HSL, raising L to the maximum always does. A later chapter compares the two models in more detail. For now, remember that "value" in the design sense is close to both V and L, but neither number is the same thing as how light the color looks.
Changing value while holding hue and saturation
Changing value alone gives you a family of related colors. The hue stays the same, so the colors still look like one family. The saturation setting stays the same, so the colors stay equally vivid or muted in the model's terms.
The CSS below sets one hue and varies only lightness.
:root {
--brand-hue: 210;
--step-1: hsl(var(--brand-hue) 80% 90%);
--step-2: hsl(var(--brand-hue) 80% 75%);
--step-3: hsl(var(--brand-hue) 80% 60%);
--step-4: hsl(var(--brand-hue) 80% 45%);
--step-5: hsl(var(--brand-hue) 80% 30%);
--step-6: hsl(var(--brand-hue) 80% 15%);
}
.swatch { height: 3rem; }
.swatch-1 { background: var(--step-1); }
.swatch-2 { background: var(--step-2); }
.swatch-3 { background: var(--step-3); }
.swatch-4 { background: var(--step-4); }
.swatch-5 { background: var(--step-5); }
.swatch-6 { background: var(--step-6); }Only the last number changes, from 90% down to 15%. The result is a ramp from a pale blue to a very dark blue. Ramps like this are the basis of most design systems, because they give you ready-made light and dark options that still belong together.
Working with value in code
You can read and change value in Python with the standard colorsys module. It uses HSV, with all values between 0 and 1.
import colorsys
# A medium blue as RGB values between 0 and 1
r, g, b = 0.2, 0.4, 0.8
h, s, v = colorsys.rgb_to_hsv(r, g, b)
print(round(h * 360), round(s, 2), round(v, 2)) # 220 0.75 0.8
# Build a ramp that changes only V
for step in range(5):
new_v = 0.2 + step * 0.2
nr, ng, nb = colorsys.hsv_to_rgb(h, s, new_v)
hex_color = "#{:02x}{:02x}{:02x}".format(
round(nr * 255), round(ng * 255), round(nb * 255)
)
print(f"V={new_v:.1f} -> {hex_color}")The first block converts a color to HSV. The loop keeps h and s fixed, changes v from 0.2 to 1.0, and prints each result as a hex code. Each line shows the same blue family getting lighter.
One gotcha: when V is low, colors become hard to tell apart no matter how different the hue is. At V = 0 every hue and saturation gives the same black. Information in hue and saturation fades as value approaches zero.
Value, hue, and the same number
A common mistake is to assume that equal numbers mean equal lightness. Two colors with the same V or the same L can look very different in brightness. A pure yellow at L = 50% looks much lighter than a pure blue at L = 50%. Yellow reflects more of the light that the eye is sensitive to.
This happens because the eye responds to each hue differently, and because the models are built from simple formulas, not from how we see. A later chapter explains this in detail. For now, use two habits:
- Judge value by looking, and use the grayscale check, not only the numbers.
- Do not swap hues in a ramp and expect the same lightness. If you change hue, check the value again.
What value does in a design
Value does more work in a layout than hue or saturation does. It affects four things.
- Legibility. Text is readable because its value differs from the background. Dark text on a light background, or light text on a dark one, works. Mid-value text on a mid-value background does not, even if the hues are very different.
- Hierarchy. The eye goes first to the area with the strongest value difference from its surroundings. A dark button on a light page stands out. A light button on a light page does not.
- Depth and form. Light and dark areas suggest surfaces. Lighter edges and darker shadows make flat shapes look raised or recessed.
- Mood. Mostly dark designs feel serious, dramatic, or quiet. Mostly light designs feel open, clean, or friendly. This is a tendency, not a rule.
The diagram shows how one hue spreads across the value range, and which uses fit each part.
Common errors
- Relying on hue alone to separate things. Red text on a green background can have nearly equal value. People with color vision differences, and anyone on a dim screen, may not see the text at all. Add a value difference.
- Using too many mid values. A design where everything sits at mid lightness looks flat and has no clear focal point. Reserve strong lights and darks for the things that matter most.
- Treating L = 50% as "medium brightness" for every hue. As noted above, the same L looks different across hues.
- Forgetting that dark colors lose their hue. Very dark ramps steps tend to look alike. If a dark swatch needs to show its hue, keep it a little lighter or raise its saturation.
- Judging value by the color itself. Surrounding colors change how light or dark a color appears. A gray square looks lighter on a dark background than on a light one. Check value in the real layout.
Summary
Value is how light or dark a color is. You can see it by removing hue and saturation. HSV and HSL express it as V and L, and the two are not the same. A ramp that changes only value gives a coherent set of related colors. Value drives legibility and hierarchy more than hue does, and equal numbers do not guarantee equal appearance.
Exercise
You have two buttons on a white page. One is a vivid red at hsl(0 90% 50%) and the other is a vivid green at hsl(120 90% 50%). Both have the same L value. When you desaturate a screenshot, the two buttons look almost identical in gray. What does this tell you about people who need to tell them apart, and what is a simple fix?
Show answer
Both buttons have nearly the same value, so they differ only in hue. Anyone with red-green color vision difference, or anyone viewing in poor conditions, may not be able to tell them apart. A simple fix is to change the value of one of them, for example make the red darker with hsl(0 90% 35%) or the green lighter with hsl(120 90% 65%). Labels or icons also help.
Exercise
In HSV, what color does H = 210°, S = 100%, V = 0% produce? What does this show about value?
Show answer
It produces black. At V = 0 the color has no light, so hue and saturation make no difference. This shows that value sets a limit on how much hue and saturation can be seen.
Exercise
Using the Python example in this chapter, which two variables stay fixed in the loop, and what is the only value that changes?
Show answer
The variables h (hue) and s (saturation) stay fixed. Only v (value) changes, from 0.2 to 1.0 in steps of 0.2.