HWB color model

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

HWB is a cylindrical-coordinate representation of points in an RGB color model, similar to HSL and HSV. It was developed by HSV’s creator Alvy Ray Smith in 1996 to address some of the issues with HSV. HWB was designed to be more intuitive for humans to use[1] and slightly faster to compute. The first coordinate, H (Hue), is the same as the Hue coordinate in HSL and HSV. W and B stand for Whiteness and Blackness respectively and range from 0 - 100% (or 0-1). The mental model is that the user can pick a main hue and then “mix” it with white and/or black to produce the desired color.[2]

HWB came to prominence in 2014 following its use in the CSS Level 4 Color Module.[1]

Converting to and from HSV

HWB is very closely related to HSV, and therefore the conversion formulas are fairly simple.[2]

HSV to HWB

\begin{align}
H &= H\\
W &= (1-S)V\\
B &= 1 - V
\end{align}

HWB to HSV

\begin{align}
H &= H\\
S &= 1 - \frac{W}{1-B} \\
V &= 1 - B
\end{align}

Swatches

The CSS Color Level 4 draft specification [1] includes a number of HWB example color swatches.[3]

0° Reds
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
30° Red-Yellows (Oranges)
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
60° Yellows
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%


90° Yellow-Greens
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
120° Greens
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
150° Green-Cyans
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%


180° Cyans
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
210° Cyan-Blues
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
240° Blues
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%


270° Blue-Magentas
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
300° Magentas
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%
330° Magenta-Reds
W\B 0% 20% 40% 60% 80% 100%
0%
20%
40%
60%
80%
100%

References

  1. 1.0 1.1 1.2 Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found. This is the original paper describing the HWB color model.
  3. CSS Color Module Level 4

<templatestyles src="Asbox/styles.css"></templatestyles>