HEX to HWB
Convert HEX to HWB online, free and in your browser. Paste a HEX code and get the CSS hwb() value: hue, whiteness and blackness, ready to copy. HWB is easy to tweak by hand, because more white makes a tint and more black makes a shade.
How to convert HEX to HWB
- 1Paste a HEX code into "Color", or pick one with the color picker
- 2Read the hwb() value in the big line under the field
- 3Click the copy button next to it
- Your color as hwb(), ready for your CSS
How it works
- Written the CSS way.The result looks like hwb(45.07 10.2% 0%), the syntax of CSS Color 4
- Nothing is sent anywhere.The conversion is a little arithmetic that runs in your browser
- Every notation below.RGB, HSL, Lab, OKLCH, XYZ and more appear in a list, each with a copy button
What you can do
- Turn a HEX code into hwb(), for example #FFC61A into hwb(45.07 10.2% 0%) and #2563EB into hwb(221.21 14.5% 7.8%)
- Type short or long HEX: #FC0, #FFCC00, and on this page also without the #
- Paste rgb(), hsl(), lab(), oklch() or a CSS color name instead, and still get HWB
- Pick a color with your browser's color picker and watch the HWB value follow
- Copy any other notation of the same color from the list, and see the nearest CSS name and Tailwind colors
Good to know
- HWB is a different way of writing the same sRGB colors as HEX, so nothing is lost or gained in the conversion
- The hue is given with up to two decimals, whiteness and blackness with one. They describe the 8-bit color of the HEX code
- A gray has no hue. It is written with a hue of 0, for example hwb(0 50.2% 49.8%) for #808080
- A HEX code with alpha, like #FFCC0080, is read without its transparency
Questions
What is HWB?
HWB stands for hue, whiteness and blackness. You start from a pure hue on the color wheel and mix in white and black. CSS writes it as hwb(hue whiteness blackness), for example hwb(200 30% 20%).
Why convert HEX to HWB?
A HEX code is hard to change by eye. In HWB you lighten a color by raising the whiteness and darken it by raising the blackness, while the hue stays where it is.
Can I use hwb() in my stylesheet?
Yes. hwb() is part of CSS Color 4 and current browsers read it. If a tool you use does not, keep the HEX code there.
Is my color sent to a server?
No. The HEX code is converted by your browser on your own device. No request is made with it.
More tools in Web & code
That page doesn't exist. Search or drop a file below to find the tool you need.
One site for every file job. What’s yours?
Stop hopping between converter sites. Pick from 410+ tools, or a recipe that chains several.
- Files Stay On Your Device
- No watermark
- Works offline
Drop a file here
A pasted file works too.
or search for a tool
Open an app
From “ugh, this file” to done, in three steps.
- Drop it, or pick a task
No file? Search for what you need. Files are processed on your device, not uploaded for processing.
- Pick what you want
Smaller, another format, signed, merged. One click, no settings to study first.
- Make it a recipe
Need three steps in a row every week? Chain them once and run the same recipe next time.
One approved toolbox for the whole team.
In offices, on building sites and in agencies, teams handle sensitive files all day. ToolRecipe gives everyone the same tools and the same recipes, and the files are processed on each person's own computer.
- Files are processed on the employee's device
- Company recipes everyone runs the same way
- One place instead of ten converter sites