HWB Color Converter
Convert HEX, RGB, or HWB colors to the CSS hwb() format with live sliders and a swatch.
HEX, RGB, or HWB, or pick a color. Everything runs in your browser. Nothing is uploaded.
Formats
How to convert a color to HWB online
Enter a color
Paste a HEX, RGB, or HWB value into the field, or pick one with the color swatch.
Adjust the sliders
Drag the hue, whiteness, and blackness sliders to refine the color and watch every format update live.
Copy the result
Copy a single format with its row button, or copy all four formats at once with the main button.
Why use this tool
Three notations in, four formats out
Accepts HEX (3, 4, 6, or 8 digits), rgb() and rgba(), or hwb() input and reports hwb(), HEX, RGB, and HSL together.
Live HWB sliders
Hue, whiteness, and blackness sliders re-run the conversion instantly, so you can tune a color instead of retyping it.
Follows the CSS Color 4 rules
When whiteness plus blackness reaches 100% the color collapses to grey, and the tool flags it so the output is never a surprise.
Transparency carried through
Alpha from 8-digit HEX, rgba(), or hwb() with a slash is preserved in every output format and shown over a checker swatch.
Runs entirely in your browser
Everything happens on your device; no color value is ever uploaded or stored.
About this tool
HWB describes a color the way a painter mixes one: start from a pure hue on the color wheel, then add whiteness to tint it and blackness to shade it. It is part of the CSS Color 4 specification and works in every modern browser, which makes it a practical alternative to HSL when you want to lighten or darken a color without reasoning about saturation. This converter reads a HEX, RGB, or HWB value and reports the same color as hwb(), HEX, RGB, and HSL at once.
Paste any common notation: 3, 4, 6, or 8 digit HEX with or without the hash, rgb() or rgba() with numbers or percentages, or an existing hwb() string. The hue, whiteness, and blackness sliders update the result instantly, so you can nudge a value and watch every format follow. Alpha is carried through whenever the input has one. When whiteness and blackness add up to 100% or more, the hue no longer matters and the color collapses to grey, exactly as the CSS specification defines; the tool shows a note when that happens so you know why the swatch looks neutral.
Each format row copies with one click, and the main button copies all four formats together. For other CSS color spaces, try the HEX to OKLCH converter, convert HSL to RGB, or read a color as HSV values.
Frequently asked questions
- What is the HWB color format?
- HWB stands for hue, whiteness, blackness. It picks a pure hue from the color wheel (0 to 360 degrees), then mixes in a percentage of white and a percentage of black. It is written in CSS as hwb(hue whiteness% blackness%) and is supported by all modern browsers.
- How does the conversion work?
- For RGB or HEX input, hue is derived from the strongest and weakest color channels, whiteness is the weakest channel as a percentage, and blackness is how far the strongest channel falls short of full. Going the other way, the pure hue is blended toward white and black by the two percentages.
- Which input formats are accepted?
- HEX in 3, 4, 6, or 8 digit form with or without a leading hash, rgb() and rgba() with numbers or percentages and comma or space separators, and hwb() strings including an optional alpha after a slash.
- What happens when whiteness plus blackness passes 100%?
- The color collapses to a grey and the hue stops mattering, per the CSS Color 4 specification. The two percentages are scaled down proportionally, and the tool shows a note so the grey swatch is not a surprise.
- Does it handle transparency?
- Yes. Alpha from an 8-digit HEX code, an rgba() value, or an hwb() value with a slash is preserved and shown in all four output formats, and the swatch renders it over a checker pattern.
- Is my color uploaded anywhere?
- No. Everything runs in your browser; nothing is sent to a server.
Related tools
HEX to OKLCH Converter
Paste a hex color and get the CSS oklch() value with lightness, chroma, and hue.
HSL to RGB Converter
Turn hue, saturation, and lightness into RGB and HEX. Slide or paste, copy the result.
RGB to HSV Converter
Turn red, green, and blue channel values into hue, saturation, and value. Move the sliders or paste a color and the HSV result updates live.
Analogous Color Generator
Turn any base color into a three swatch analogous palette by rotating its hue.
Aspect Ratio Calculator
Solve the missing width or height for any aspect ratio, from 16:9 to a custom shape.
CSS Box Shadow Generator
Dial in a CSS box-shadow with live preview and copy the exact code.