HWB是一种将RGB色彩模型中的点在圆柱坐标系中的表示法。类似于HSLHSV。它是由HSV的发明者Alvy Ray Smith英语Alvy Ray Smith于1996年开发的,用意是解决HSV的某些问题。HWB能更直观的使用[1],且能加速计算速度。

  • H: 色相(Hue),与HSL和HSV一样,范围是0°~360°。
  • W:白色(White),白色的浓度,范围是0%~100%。
  • B:黑色(Black),黑色浓度,范围是0%~100%。

HWB被应用在CSS4

转换方式 编辑

HWB与HSV非常类似,因此转换公式非常简单[2]。HWB转换前,白色和黑色总和需要在100%以下,如果超过的话按比例降低至100%。

HSV 转 HWB HWB 转 HSV RGB 转 HWB
     
  1. ^ §7 HWB Colors: hwb() function. CSS Color Module Level 4. W3C. 15 April 2014 [2020-09-02]. (原始内容存档于2015-07-09). 
  2. ^ Smith, Alvy Ray. HWB — A More Intuitive Hue-Based Color Model (PDF). Journal of Graphics, GPU and Game tools. 1996, 1 (1): 3–17 [2020-09-02]. (原始内容存档 (PDF)于2015-03-11).  This is the original paper describing the HWB color model.