HWB: Hue Whiteness Blackness CSS Color 4

CSS Color 4 cylindrical notation mixing a pure hue angle (0–360°) with percentages of Whiteness (W) and Blackness (B) — zero saturation math needed.

Extension / Token.css
MIME / Media typetext/css
Gamut scopesRGB (Standard Web)
Human readabilityHigh
Perceptual uniformityNo
Alpha channel supportYes
Best forPainterly tint-and-shade thinking by adding white and black directly to pure hues
HWB
CSS
hwb(221 15% 8%)

Strengths

  • Mirrors how painters and illustrators tint with white or shade with black.
  • Native CSS Color 4 hwb() support across modern Chrome, Safari, and Firefox.
  • Instant neutral detection whenever W + B >= 100%.

Trade-offs

  • Like HSL, it remains non-perceptual and locked to the sRGB gamut.
  • Less widely used in Figma or Tailwind presets than Hex or OKLCH.

Convert & inspect HWB locally

Related color engineering guides

HWB frequently asked questions

When is HWB easier than HSL?

HWB avoids calculating simultaneous saturation and lightness offsets when making pastel tints (raise W) or deep shadows (raise B).

Can every sRGB Hex color convert losslessly to HWB?

Yes — HWB is a bijective geometric coordinate mapping of the sRGB cube.