UTILS.
Private by default
#?

CSS Color Formats

Show one color in every CSS format: hex, rgb(), hsl() and hwb().

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
Click any value to copy it.

About this tool

Pick a color and instantly see its hex, rgb(), hsl() and hwb() forms, converted entirely in your browser.

Accepted input is a hex color with or without the leading #, in 3-digit shorthand (such as f80) or 6-digit form. Letters can be upper or lower case, but results are always shown in lowercase. Eight-digit hex with an alpha channel is not accepted, so only opaque colors work.

The picker and the text box stay in sync. A valid value updates the swatch and all four tiles as you type; an invalid one shows an error and clears the tiles. Hue, saturation, lightness, whiteness and blackness are rounded to whole numbers. The HWB tile uses the space-separated syntax, for example hwb(217 23% 4%), while rgb() and hsl() use commas.

Frequently asked questions

How are the formats calculated?
The hex value is converted to RGB, then to HSL and HWB using standard color-space formulas, all in your browser.
How do I copy a value?
Click any of the format tiles and that CSS value is copied to your clipboard.
Can I enter a color name or an rgb() value?
No. The text box reads only hex values, so red or rgb(59, 130, 246) is shown as invalid. Use the color picker to choose visually.
Does it handle transparency?
No. None of the four output values carries an alpha channel.

More tools