HEX to HWB Converter
Convert HEX codes to HWB with live, two-way sliders.
About the HEX to HWB Converter
What is HEX to HWB conversion?
HWB describes a color the way a painter mixes one: start from a pure Hue, then add Whiteness and Blackness. hwb(217 4% 4%) is a vivid blue with a whisper of white and black mixed in; push W up and you get pastels, push B up and you get deep shades. It's arguably the most human-friendly of all the CSS color functions, and this converter turns any HEX code into its exact hwb() equivalent — along with RGB, HSL, HSB, OKLCH, LCH, LAB and CMYK.
HWB shares its hue wheel with HSL and HSB, so the H you see here matches those formats exactly — only the mixing model differs. Everything computes live in your browser as you type or drag, with nothing uploaded.
How to Use This Tool
- Enter a HEX code. Type or paste it, pick from the swatch, or use the eyedropper on anything on screen.
- Read the HWB value. The
hwb()string heads the results, ready to paste into CSS. - Think like a painter. W tells you how much white is mixed into the color, B how much black — a great sanity check on any palette.
- Copy or explore. Every format has one-click copy, plus shades, tints and harmonies to branch from.
Common Use Cases
- Readable CSS: hwb() often expresses design intent (a softened red, a darkened teal) more clearly than HSL.
- Building tints and shades: Keep H fixed and vary only W or B for principled pastel and shadow scales.
- Understanding a palette: The W/B split shows at a glance which brand colors are washed out and which are deep.
- Teaching color: HWB maps directly onto the paint-mixing intuition most people already have.
- Modern stylesheets: hwb() has been supported in all major browsers since 2022.
Need the reverse? Use the HWB to HEX converter, compare with HEX to HSB, or browse all our free color tools.
Frequently Asked Questions
What is HWB?
HWB stands for Hue, Whiteness, Blackness. It describes a color as a pure hue with white and black mixed in, mirroring how painters lighten and darken pigments. It became a native CSS function, hwb(), in all major browsers during 2022.
How is HWB different from HSL?
They share the same hue wheel, but HSL positions a color by saturation and lightness while HWB says how much white and how much black are mixed into the pure hue. hwb(0 40% 0%) is a pink (red plus white); the equivalent HSL needs less obvious numbers.
What happens when W plus B exceeds 100%?
The color becomes a pure gray determined by the ratio of white to black, and the hue stops mattering. The CSS specification normalizes the two values, and this converter does the same.
Is the conversion exact?
Yes. HWB, like HSL and HSB, is a direct transformation of RGB, so every HEX code has one exact HWB equivalent and converting back lands on the identical color.
Is this tool free and private?
Completely. The conversion runs entirely in your browser with JavaScript, nothing you enter is uploaded or logged, and the page keeps working offline once loaded.