Color (any format)
Couldn't read that color. Try #3b82f6, rgb(59,130,246), hsl(217,91%,60%) or hsv(217,76%,96%).
A color code converter that answers "how do I write this color in CSS?" in one step. Paste any one format — a HEX like `#3b82f6`, `rgb(59, 130, 246)`, `hsl(217, 91%, 60%)`, or `hsv(217, 76%, 96%)` — and it converts the color into all four formats (HEX, RGB, HSL, HSV) at once, each with a one-click copy button. The input format is auto-detected, so you never have to pick which box to use. It accepts six-digit HEX, the three-digit shorthand like `#39f`, eight-digit HEX with alpha such as `#3b82f680`, and the alpha in `rgba()` / `hsla()` — when alpha is present it is carried into each output. A color picker next to the input lets you choose a color visually and fills in every code in reverse, while a large swatch shows how it actually looks. You can toggle whether HEX is output in upper- or lower-case, and that preference is saved in your browser so it opens the same way next time. HSL is shown in CSS-ready `hsl(hue, sat%, light%)` notation, and HSV (also known as HSB) is shown as the hue/saturation/value triple used by most color pickers. RGB↔HSL↔HSV conversions use the standard formulas; because values are rounded to integers, a round trip can shift the last digit by one (e.g. 60% becoming 59%), which is normal for color tools. Importantly, the color values you enter are never uploaded, stored, or sent to a server — all conversion happens with JavaScript entirely inside your browser, so brand colors and unreleased palettes stay on your device. CMYK, Lab, and named colors are out of scope; this tool focuses on the four formats you use most on the web.
How to use
- Paste one color into the top box (`#3b82f6`, `rgb(59,130,246)`, `hsl(217,91%,60%)`, or `hsv(217,76%,96%)` — any works).
- HEX, RGB, HSL, and HSV appear below; press "Copy" on the value you need.
- Use the color picker beside the input to choose a color and fill every code in reverse. Nothing is sent anywhere.
FAQ
Are the color values I enter uploaded anywhere?
No. All conversion happens with JavaScript inside your browser, and the values are never uploaded, stored, or sent to a server. Brand colors and unreleased palettes stay entirely on your device.
Can it convert colors with alpha (transparency)?
Yes. It reads eight-digit (or four-digit) HEX like `#3b82f680` and the alpha in `rgba()` / `hsla()`, and carries the alpha into each output. When alpha is 1 (fully opaque), it is omitted for cleaner output.
Are HSV and HSB different?
They are the same thing. HSV (Hue, Saturation, Value) is also called HSB (Hue, Saturation, Brightness) and is widely used in color pickers. This tool shows the same three values under either name.
Why does a value sometimes shift by one after converting?
RGB, HSL, and HSV are displayed as integers, so moving between formats can shift the last digit by one due to rounding (e.g. 60% to 59%). This is normal for color tools, and the colors look essentially identical.
Does it support CMYK or named colors like red and tomato?
Not currently. This tool focuses on the four formats most used in web work — HEX, RGB, HSL, and HSV. CMYK (print), Lab, and named-color input are possible future additions.