HWB to HEX Converter
Convert HWB colors into HEX codes for design tools, tokens, and older CSS workflows.
Use hwb(hue whiteness% blackness%) or comma-separated values such as 210, 11.8, 0.
Enter a valid HWB color value.
Input Format
HWB color
HWB uses a hue angle plus whiteness and blackness percentages. Whiteness plus blackness must not exceed 100%.
HEX color code
HEX is the standard six-digit color code accepted by every browser and most design applications.
Conversion Logic
The converter turns HWB into HSV-style chroma, converts that intermediate color to RGB, then serializes the RGB channels as hexadecimal pairs.
value = 1 - blackness
saturation = value === 0 ? 0 : 1 - whiteness / value
RGB = HSV(hue, saturation, value)
Common Examples
| HWB | HEX | Preview |
|---|---|---|
| hwb(0 100% 0%) | #FFFFFF | |
| hwb(0 0% 100%) | #000000 | |
| hwb(0 0% 0%) | #FF0000 | |
| hwb(210 11.8% 0%) | #1E90FF |
When This Conversion Helps
CSS handoff
Convert copied design values into a CSS color syntax that fits the browser feature you are using.
Design systems
Compare the same color across formats before adding tokens, variables, or documentation examples.
Color audits
Translate stored brand colors into perceptual formats when reviewing lightness, contrast, or palette balance.
Common Input Mistakes
- Do not let whiteness and blackness add up to more than 100%.
- Use a hue from 0 to 360 degrees. Negative values are normalized, but explicit positive hues are clearer.
- Keep the percent signs when using CSS syntax so the meaning is unambiguous.
FAQ
Can I use this HWB to HEX converter for CSS? v
Yes. The result is formatted for practical CSS and design handoff. Check browser support when using newer color spaces such as LCH or OKLCH directly in production CSS.
Why does the converted value sometimes look rounded? v
Some color spaces use decimal channels. The tool rounds output to readable precision while keeping the preview tied to the converted RGB color.
Does conversion change the color? v
The goal is to preserve the same sRGB color as closely as possible. Out-of-gamut perceptual values are clamped when converted back to HEX or RGB.
Using This Tool Reliably
Input and output checks
Paste the color value in the format shown by the input label, then compare the preview against the copied result before using it in CSS, a design token, or a brand document.
Conversion logic
The browser calculates the result from the displayed channel values, rounds only for readable output, and keeps the visual preview tied to the same computed color.
Example workflow
Start with a known value such as #1E90FF, review the generated formats, copy the result, then test important text and UI states in the contrast checker when readability matters.
Common mistakes
Watch for missing # characters, RGB channels outside 0-255, percentages entered as plain numbers, alpha values copied into solid-color fields, and colors reused for text without checking contrast.
Related Color Tools
Open the next tool for this color task.
HEX to HWB Converter
converterConvert HEX colors into HWB CSS values.
OKLCH to HEX Converter
converterConvert OKLCH values into HEX fallbacks.
LCH to HEX Converter
converterConvert LCH values into sRGB HEX codes.
Color Converters - HEX, RGB, HWB & OKLCH
tool-hubConvert colors across web, CSS, perceptual, and print formats.