HSB color mode
Processing can express color as hue/saturation/brightness instead of RGB via colorMode(HSB), often more convenient for generating coherent color ramps.
What it means
HSB — hue, saturation, brightness — specifies a colour with those three values instead of red, green and blue channels. In Processing, colorMode(HSB) switches what the arguments to color(), fill() and stroke() mean: instead of red/green/blue intensities, they become hue, saturation and brightness. Programming Design Systems describes the same model under its other common name, HSV, and is specific about what it actually is: “a cylindrical color model that remaps the RGB primary colors.” It is not a different gamut of colours from RGB — it is the same RGB cube, restated in coordinates where one axis is a rotatable hue instead of three coupled channel values.
Why it matters in practice
The corpus’s own framing of the payoff is generating coherent colour ramps: once hue is its own axis, you can step through it — rotate hue while holding saturation and brightness fixed — and get a family of colours that all share a “temperature” without touching the channels that control how saturated or how light each one is. Doing the equivalent walk in RGB means moving all three channels together in a way that doesn’t correspond to any one visual property.
How it shows up in code
colorMode(HSB) is the whole switch — Processing’s tutorial states it plainly: “you can also specify colors in the HSB (hue, saturation, and brightness) mode.” What the mode name doesn’t fix is the numeric range each of the three arguments runs over. The tutorial notes a specific convention some people set explicitly: “Some prefer a range of 0-360 for hue (think of 360 degrees on a color wheel) and 0-100 for saturation and brightness (think of 0-100%).” That’s a preference, not the mode’s only behaviour — Processing’s colorMode() call takes a rescale argument generally, shown in the tutorial with colorMode(RGB,100);, and the same rescaling mechanism is what lets someone set HSB’s three ranges to 360/100/100 instead of leaving them at whatever the default otherwise is.
Works that embody it
The evidence gathered for this page doesn’t name a specific artwork built on HSB. What it shows instead is the mode presented as core Processing/p5 API — Shiffman’s tutorial teaches it as one of two colour-specification modes available to any sketch — and, under its HSV name, as one entry in Programming Design Systems’ survey of colour models.
Arguments against it
The corpus doesn’t hand this page a direct claim that HSB’s hue or brightness steps are perceptually uneven — that would need its own evidence, and none of the excerpts here make it, so it’s left as an open question rather than asserted. What the corpus does record is a contrast relation to HSB vs. RYB: the red-yellow-blue artist’s colour wheel, reached for instead of HSB or RGB hue rotation specifically “when procedural color choices need to read as intuitively harmonious to a human eye.” That relation is flagged at a middling 0.6 confidence in the registry, but its existence at all is itself worth noting — if rotating through HSB’s hue axis already read as intuitively harmonious, there’d be no case for a different wheel built for that purpose.
Connected to
Contrast with: HSB vs. RYB
Try it yourself
You've been generating a palette with colorMode(HSB, 360, 100, 100) and hue values that look right on paper — 0, 120, 240 for a triadic spread. You switch a collaborator's sketch to the same colours, but they never called colorMode(HSB, ...) with those three numbers — they left it at whatever colorMode(HSB) alone gives them. The colours come out wrong. Why?
colorMode(HSB) only switches which three quantities color() expects; it doesn't by itself fix what range those quantities run over. The 0-360/0-100 split is a convention some people set explicitly, not a value baked into the mode name — pass hue=240 expecting 'blue' and a sketch running on a different range for that channel reads 240 as something else entirely, or clips it. The bug is in the missing range arguments, not in the hue math.