Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Designing With AI, Not Around It: Practical Advanced Techniques For Product Design Use Cases

      August 11, 2025

      Why Companies Are Investing in AI-Powered React.js Development Services in 2025

      August 11, 2025

      The coming AI smartphone: Redefining personal tech

      August 11, 2025

      Modern React animation libraries: Real examples for engaging UIs

      August 11, 2025

      Why xAI is giving you ‘limited’ free access to Grok 4

      August 11, 2025

      How Debian 13’s little improvements add up to the distro’s surprisingly big leap forward

      August 11, 2025

      How Apple may revamp Siri to a voice assistant I’d actually use (and ditch Gemini for)

      August 11, 2025

      I jump-started a bus from the 1930s with this power bank – here’s the verdict

      August 11, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Laravel’s UsePolicy Attribute: Explicit Authorization Control

      August 11, 2025
      Recent

      Laravel’s UsePolicy Attribute: Explicit Authorization Control

      August 11, 2025

      The Laravel Way to Build AI Agents That Actually Work

      August 11, 2025

      The Laravel Way to Build AI Agents That Actually Work

      August 11, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft sued over killing support for Windows 10

      August 11, 2025
      Recent

      Microsoft sued over killing support for Windows 10

      August 11, 2025

      Grok 4 rolled out for free-tier users worldwide, with some limits

      August 11, 2025

      Firefox AI slammed for hogging CPU and draining battery

      August 11, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»Why is Nobody Using the hwb() Color Function?

    Why is Nobody Using the hwb() Color Function?

    May 7, 2025

    Okay, nobody is an exaggeration, but have you seen the stats for hwb()? They show a steep decline, and after working a lot on color in the CSS-Tricks almanac, I’ve just been wondering why that is.

    Chrome Platform Status for hwb(), showing a steep decline in usage from 0.4 percent of all page loads in 2024 to less than .2 perfect in 2025.

    hwb() is a color function in the sRGB color space, which is the same color space used by rgb(), hsl() and the older hexadecimal color format (e.g. #f8a100). hwb() is supposed to be more intuitive and easier to work with than hsl(). I kinda get why it’s considered “easier” since you specify how much black or white you want to add to a given color. But, how is hwb() more intuitive than hsl()?

    hwb() accepts three values, and similar to hsl(), the first value specifies the color’s hue (between 0deg–360deg), while the second and third values add whiteness (0 – 100) and blackness (0 – 100) to the mix, respectively.

    According to Google, the term “intuitive” means “what one feels to be true even without conscious reasoning; instinctive.” As such, it does truly seem that hwb() is more intuitive than hsl(), but it’s only a slight notable difference that makes that true.

    Let’s consider an example with a color. We’ll declare light orange in both hsl() and hwb():

    /* light orange in hsl */
    .element-1 {
      color: hsl(30deg 100% 75%);
    }
    
    /* light orange in hwb() */
    .element-2 {
      color: hwb(30deg 50% 0%);
    }

    These two functions produce the exact same color, but while hwb() handles ligthness with two arguments, hsl() does it with just one, leaving one argument for the saturation. By comparison, hwb() provides no clear intuitive way to set just the saturation. I’d argue that makes the hwb() function less intuitive than hsl().

    I think another reason that hsl() is generally more intuitive than hwb() is that HSL as a color model was created in the 1970s while HWB as a color model was created in 1996. We’ve had much more time to get acquainted with hsl() than we have hwb(). hsl() was implemented by browsers as far back as 2008, Safari being the first and other browsers following suit. Meanwhile, hwb() gained support as recently as 2021! That’s more than a 10-year gap between functions when it comes to using them and being familiar with them.

    There’s also the fact that other color functions that are used to represent colors in other color spaces — such as lab(), lch(), oklab(), and oklch() — offer more advantages, such as access to more colors in the color gamut and perceptual uniformity. So, maybe being intuitive is coming at the expense of having a more robust feature set, which could explain why you might go with a less intuitive function that doesn’t use sRGB.

    Look, I can get around the idea of controlling how white or black you want a color to look based on personal preferences, and for designers, it’s maybe easier to mix colors that way. But I honestly would not opt for this as my go-to color function in the sRGB color space because hsl() does something similar using the same hue, but with saturation and lightness as the parameters which is far more intuitive than what hwb() offers.

    I see our web friend, Stefan Judis, preferring hsl() over hwb() in his article on hwb().

    Lea Verou even brought up the idea of removing hwb() from the spec in 2022, but a decision was made to leave it as it was since browsers were already implementing the function. And although,I was initially pained by the idea of keeping hwb() around, I also quite understand the feeling of working on something, and then seeing it thrown in the bin. Once we’ve introduced something, it’s always tough to walk it back, especially when it comes to maintaining backwards compatibility, which is a core tenet of the web.

    I would like to say something though: lab(), lch(), oklab(), oklch() are already here and are better color functions than hwb(). I, for one, would encourage using them over hwb() because they support so many more colors that are simply missing from the hsl() and hwb() functions.

    I’ve been exploring colors for quite some time now, so any input would be extremely helpful. What color functions are you using in your everyday website or web application, and why?

    More on color

    Almanac

    on

    Feb 22, 2025


    hsl()


    .element { color: hsl(90deg, 50%, 50%); }

    color


    Sunkanmi Fafowora

    Almanac

    on

    Mar 4, 2025


    lab()


    .element { color: lab(50% 50% 50% / 0.5); }

    color


    Sunkanmi Fafowora

    Almanac

    on

    Mar 12, 2025


    lch()


    .element { color: lch(10% 0.215 15deg); }

    color


    Sunkanmi Fafowora

    Almanac

    on

    Apr 29, 2025


    oklab()


    .element { color: oklab(25.77% 25.77% 54.88%; }

    color


    Sunkanmi Fafowora

    Almanac

    on

    Apr 3, 2025


    oklch()


    .element { color: oklch(70% 0.15 240); }

    color


    Gabriel Shoyombo


    Why is Nobody Using the hwb() Color Function? originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleMicrosoft: April updates cause Windows Server auth issues
    Next Article On-Scroll 3D Carousel

    Related Posts

    News & Updates

    How Debian 13’s little improvements add up to the distro’s surprisingly big leap forward

    August 11, 2025
    News & Updates

    Why xAI is giving you ‘limited’ free access to Grok 4

    August 11, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Three.js: The Future of 3D Web Development

    Development

    Mysterious Disappearance of Cybersecurity Expert Xiaofeng Wang and Wife Triggers FBI Raids

    Development

    ai generator coloring page

    Web Development

    CVE-2025-53489 – Wikimedia Foundation Mediawiki GoogleDocs4MW Extension Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Do LLMs Know Internally When They Follow Instructions?

    April 10, 2025

    Instruction-following is crucial for building AI agents with large language models (LLMs), as these models…

    The Case for End-to-End Engineering Education: Preparing Institutions for a Dynamic Future

    August 2, 2025

    LaunchDarkly adds new features to help developers release faster while mitigating risk

    May 14, 2025

    CVE-2025-49417 – BestWpDeveloper WooCommerce Product Multi-Action Object Injection Vulnerability

    July 4, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.