How to convert a color
There are two ways in. Click the picker to choose a color visually, or type any CSS color string into the input — a HEX such as #2dd4a7, an rgb(45, 212, 167), an hsl(162, 65%, 50%), or their alpha variants — and press Convert. The swatch fills with the color and every format is listed beside it, each with a one-click Copy button so you can paste straight into CSS, a design file or code. The Random button rolls a fresh color, which is a quick way to explore a palette or grab a placeholder.
Input is forgiving: shorthand three-digit HEX like #2c7 expands correctly, the leading # is optional, and spacing inside rgb() or hsl() does not matter. If a value cannot be parsed the status line says so rather than guessing.
HEX, RGB, HSL and HSV — what each one is for
HEX is the compact hexadecimal notation web developers reach for most: two digits each for red, green and blue, optionally two more for alpha. RGB expresses the same three channels as decimal 0–255 values and is what screens actually emit, which makes it the natural hub format for conversion. HSL — hue, saturation, lightness — is far more intuitive when you want to adjust a color rather than specify it: nudge the hue to shift along the rainbow, drop the saturation toward grey, or raise the lightness toward white. CSS supports HSL directly. HSV (also called HSB, for brightness) is the model most design and image apps expose in their color pickers; it shares hue and saturation with HSL but swaps lightness for value.
Alpha and transparency
Transparency is carried through end to end. Enter an 8-digit HEX like #2dd4a780, an rgba(45,212,167,0.5) or an hsla(...) and the alpha is preserved in every output, including the CSS rgba() and hsla() strings and the 8-digit HEX. When alpha is fully opaque the tool emits the shorter six-digit HEX and plain rgb()/hsl() forms to keep your CSS clean.
How the conversion math works
Every input is first parsed to a canonical RGBA tuple — red, green and blue as 0–255 integers plus an alpha from 0 to 1. From that single source of truth the tool derives all other formats, so round-trips are consistent. RGB-to-HSL and RGB-to-HSV both start by finding the maximum and minimum of the normalized channels: their difference gives chroma, the hue is the angle of the dominant channel on the 0–360° color wheel, and the third axis (lightness or value) comes from where the color sits between black and white. Converting back multiplies through the same relationships. Because these are exact algebraic formulas rather than table look-ups or model estimates, the same color always yields the same numbers.
Why use a local color converter
Color conversion is deterministic math, which makes it a perfect example of a job a deterministic tool should do and an AI chatbot should not. Ask a model to "convert #2dd4a7 to HSL" and it may be close, but it can round inconsistently or transpose a channel — and you will not know unless you check. A real converter applies the formula and is exact every time. It is also faster: no prompt, no round-trip, just instant output as you type. And like everything on gitime.dev it runs entirely in your browser, so even a brand-color you would rather not share with a third-party service never leaves your machine.
- Four models — HEX, RGB, HSL and HSV — plus copy-ready CSS strings.
- Alpha preserved across every format.
- Forgiving input: shorthand HEX, optional
#, flexible spacing. - Exact algebraic conversion — no rounding surprises.
- Local — nothing uploaded, nothing logged.
Frequently asked questions
- What color formats can it convert?
- HEX (3-, 6- and 8-digit), RGB/RGBA, HSL/HSLA and HSV/HSB — change any one and the rest update instantly.
- Does it support transparency?
- Yes. Alpha from 8-digit HEX,
rgba()orhsla()is preserved in all outputs. - What is the difference between HSL and HSV?
- HSL's third axis is Lightness (50% = pure hue); HSV's is Value/Brightness (100% = brightest hue). CSS uses HSL; design apps often use HSV.
- Is anything uploaded?
- No. All parsing and conversion run locally in your browser.