CSS HWB Color Generator - Online Whiteness/Blackness Picker
Interactively create colors in HWB space and get the CSS hwb() function. Simplifies tint/shade workflows. Live preview.
UD5 Toolkit
Hue · Whiteness · Blackness — Intuitive color mixing model
Preview
🎯 Preset Colors:
HWB stands for Hue-Whiteness-Blackness, a cylindrical-coordinate color model introduced by Alvy Ray Smith in 1996. It describes colors by their hue angle (0–360°), the amount of white mixed in (0–100%), and the amount of black mixed in (0–100%). The key constraint is that W + B ≤ 100%. HWB is considered more intuitive than HSL or HSV because it mirrors how artists physically mix paint — adding white to tint or black to shade a pure hue.
While HSL uses Saturation and Lightness, and HSV uses Saturation and Value (Brightness), HWB uses Whiteness and Blackness directly. This makes HWB much more intuitive: you start with a pure hue, then add white to lighten it or black to darken it. In HSL, adjusting lightness affects both white and black content simultaneously, which can be less predictable. HWB separates these two mixing operations cleanly.
When W + B exceeds 100%, the color becomes physically meaningless — you'd be adding more white and black than the total color can contain. In standard HWB, if W + B > 100%, the values are typically normalized proportionally so that W + B = 100%. The resulting color lies on the grayscale diagonal between pure white and pure black. Our tool automatically handles this normalization for you.
Yes! CSS Color Level 4 introduced the hwb() function. You can write color: hwb(210 20% 30%); in modern browsers (Chrome 101+, Firefox 96+, Safari 15.4+). This means HWB can be used directly in your stylesheets without manual conversion. Our tool generates ready-to-use hwb() CSS syntax for you.
The conversion works in two steps: First, the hue angle is converted to a fully-saturated RGB color (like HSL with S=100%, L=50%). Then, the RGB values are blended with white and black: Result = saturatedRGB × (1−W−B) + White × W + Black × B. Since white is (1,1,1) and black is (0,0,0) in normalized RGB, the formula simplifies. Our tool performs all conversions in real-time and displays HEX, RGB, HSL, and HWB formats simultaneously.
HWB is particularly advantageous for designers and artists because it matches the natural mental model of color mixing. It's excellent for generating tints (add white), shades (add black), and tones (add both). The model also makes it trivial to find grayscale equivalents — any color where W + B = 100% is a pure gray. This intuitive approach reduces the guesswork in color palette creation.
Start by selecting a hue using the rainbow slider at the top. Then, use the triangular 2D panel to visually explore whiteness and blackness combinations. The diagonal edge of the triangle represents pure grays. Click and drag within the triangle to see real-time color changes. You can also fine-tune values using the W and B sliders or number inputs. Paste any HEX code to load an existing color and see its HWB breakdown. Click the copy buttons to grab any format for your project.
In the HWB model, when W + B = 100%, the resulting color is always a neutral gray. The shade of gray is determined by the ratio of W to B: more white yields lighter grays, more black yields darker grays. When W + B < 100%, the color retains chromaticity from the hue. This makes HWB uniquely suited for understanding and controlling color saturation in an intuitive way.
Interactively create colors in HWB space and get the CSS hwb() function. Simplifies tint/shade workflows. Live preview.
Pick colors from a palette or use the eye dropper to sample colors from your screen. Converts between HEX, RGB, HSL. An essential tool for designers.
Type a CSS color name like 'tomato' or 'mediumseagreen' and instantly get its hex code and preview. Complete named colors list.
Select colors in the OKLCH space with lightness, chroma, and hue. Convert to hex, RGB, and CSS oklch(). Perceptually uniform gradients.
Classic HSV color wheel with sliders. See hex, RGB, and HSL equivalents. Intuitive for artists. No server interaction.
Enter color in any CSS format and see all other representations. Live preview. Swatch history.
Use the light‑dark() CSS function to change colors based on color scheme. Build a simple dark mode toggle with one property.
Use <input type='color'> and see its change events and value in hex. Understand the native color picker. Quick demo.
Browse all official LEGO colors with names, years, and hex codes. Sort by hue. Perfect for builders.
Design a layout where nested grids share track sizes with their parent via subgrid. Copy the complete CSS.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Enter a hex color and get its relative luminance per WCAG definition. Understand why this matters for contrast.
Enter L*a*b* values and see the corresponding RGB and hex color. Useful for advanced color manipulation.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
See a random color and type its name. Score based on accuracy. Fun for designers. Local.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Convert hex or RGB to CIELAB L*a*b* values. Understand perceptual lightness and color opponents. Local math.
Explore the RGB color space as a rotatable 3D cube. Pick a color directly from the volume. Drag to rotate. Canvas 3D.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Convert any image into colored ASCII art using divs with background colors. Creates a stunning text‑based replica. View & copy HTML.
Generate a subtle noise/grain texture as a CSS background pattern. Adjust opacity and size. For that film look.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Upload two images and apply CSS blend modes (multiply, screen, overlay, etc.). See the result and copy the filter CSS. Pure frontend.
Create a glowing or rotating border animation around an element. Copy the CSS keyframes. Pure CSS magic.
Create a custom HTML/CSS progress bar with percentage, colors, and animation. Copy the code. Modern UI element.
Design a realistic neon sign text with multiple layers of glow. Copy the CSS and HTML. Perfect for headers.
A replica of the famous Flexbox Froggy game: solve alignment puzzles by writing CSS. Progress saved locally. Fun frontend learning.
Fetch a website's CSS and extract :root custom properties (‑‑color) to reveal its design token palette. For learning and inspiration.
Get the exact RGB inversion (negative) of any color. Useful for dark mode theming and high‑contrast accessibility checks.