HWB - A More Intuitive Hue-Based Color Model

Alvy Ray Smith and Eric Ray Lyons
Altamira Software Corp

This paper appears in issue Volume 1, Number 1.
Purchase this issue from the akpeters.com web site.

Abstract

The two most common color selector models, other than RGB (Red-Green-Blue), are the hue-based HSV (Hue-Saturation-Value) and HSL (Hue-Saturation-Lightness) color models. It is shown that both of these models are flawed. A closely related model, HWB (Hue-Whiteness-Blackness), is introduced that avoids the flaws, is slightly faster to compute, and is very easy to teach to new users: Choose a hue. Lighten it with white. Darken it with black. We explain that lightening is not the opposite of darkening.

Author Information

Alvy Ray Smith, Mill Valley, CA alvys@microsoft.com

Eric Ray Lyons, Mill Valley, CA lyons@nbn.com

Source Code

Downloadable C code that implements the color transforms described in the paper: HWB to RGB transforms, and the closely related HSV to RGB transforms.

Revision history:

  • 31 Jan 1996
    • Initial version.
  • 28 Mar 1997
    • HSV to RGB: Corrected bug in test if i is even (see erratum below).
  • 27 Oct 1997
    • HSV to RGB: deleted spurious line b = 1-v;

Errata

On page 17, in the source code for the routine HSV_to_RGB(), the line

    if (i^1) f = 1 - f; // if i is even

should be:

    if (!(i&1)) f = 1 - f; // if i is even

This correction has been made in the downloadable source code listed above.

BibTeX Entry

@article{SmithLyons96,
  author = "Alvy Ray Smith and Eric Ray Lyons",
  title = "HWB - A More Intuitive Hue-Based Color Model",
  journal = "journal of graphics, gpu, and game tools",
  volume = "1",
  number = "1",
  pages = "3-17",
  year = "1996",
}