Convert colors between HEX, RGB, RGBA, HSL, CMYK & HSV with alpha support

Our free online color converter lets you instantly convert colors between all major formats — HEX, RGB, RGBA, HSL, HSLA, CMYK, and HSV — with full alpha channel (transparency) support. Whether you're a designer working with CSS colors, a developer matching brand colors, or a print professional converting screen colors to CMYK, this tool provides real-time, accurate conversions directly in your browser. Use the opacity slider to fine-tune transparency, or enter 8-digit HEX codes (#RRGGBBAA) for precise alpha control. No software installation needed. The HEX, RGB and HSL notations follow the W3C's CSS Color Module Level 4, so a value copied from this page parses identically inside a stylesheet.
Type any one of these into any field and the whole grid re-renders from it. Here are two complete rows so you can see how the same method treats a cool and a warm color.
| Format | From blue #3b82f6 | From orange #ff5733 |
|---|---|---|
| HEX | #3b82f6 | #ff5733 |
| RGB | rgb(59, 130, 246) | rgb(255, 87, 51) |
| RGBA | rgba(59, 130, 246, 1) | rgba(255, 87, 51, 1) |
| HSL | hsl(217, 91%, 60%) | hsl(11, 100%, 60%) |
| HSLA | hsla(217, 91%, 60%, 1) | hsla(11, 100%, 60%, 1) |
| HSV | hsv(217, 76%, 96%) | hsv(11, 80%, 100%) |
| CMYK | cmyk(76%, 47%, 0%, 4%) | cmyk(0%, 66%, 80%, 0%) |
HEX comes out lowercase and every channel keeps its percent sign, because those are the two places where a missing unit silently changes the meaning of a color.
Each field is strict about its own notation and lenient about the rest: spaces, casing and the function wrapper are optional where the parser allows it.
| Field | Accepts | Example |
|---|---|---|
| HEX | 3, 4, 6 or 8 digits, with or without the hash | 3B82F6, #3b82f680 |
| RGB | Three integers from 0 to 255 | rgb(59, 130, 246) |
| RGBA | Three integers plus alpha as a 0-1 fraction | rgba(59, 130, 246, 0.5) |
| HSL and HSLA | Degrees plus two percentages, alpha optional | hsl(217, 91%, 60%) |
| HSV and HSVA | Same shape, brightness instead of lightness | hsv(217, 76%, 96%) |
| CMYK | Four ink percentages, with or without the cmyk() wrapper | cmyk(76%, 47%, 0%, 4%) or 76, 47, 0, 4 |
The RGB, RGBA, HSL, HSV and CMYK fields pass your text through a color parser before redrawing, so a CSS color name such as tomato or rebeccapurple resolves there. The HEX field is narrower: it checks the string against a hex pattern, and a name typed into it simply does not convert.
A conversion table is only honest if it says where information disappears. Three cases matter in practice.
The reverse direction is lossy in a way that surprises people: several CMYK quadruples collapse onto the same screen color, and the formula has no memory of which one you began with. Converting HEX to RGB to HEX returns the original; converting RGB to CMYK back to RGB can shift a channel by one or two levels.
The most useful thing a converter gives you is not the list of notations, it is the ability to build a family from one color. Store the channels once and derive every translucent variant from them, so a rebrand is a one-line change instead of a search-and-replace across a stylesheet.
:root {
--blue: #3b82f6;
--blue-rgb: 59, 130, 246;
--blue-10: rgba(var(--blue-rgb), 0.1);
--blue-50: rgba(var(--blue-rgb), 0.5);
}
.button {
background: var(--blue);
border-color: var(--blue-50);
}rgba() takes the three channels as a comma-separated list, which is why --blue-rgb holds 59, 130, 246 rather than a full color.
$blue: #3b82f6;
$blue-rgb: 59 130 246;
.button {
background: $blue;
color: rgba($blue-rgb, 0.1);
}The converter takes text and returns text, so it is the step you reach for when a value already exists. To get a value off your display use the screen Color Picker; to get one out of a file use the Image Color Picker. Once the notation you need is in hand, the pair you plan to ship should go through the Contrast Checker, and a set of values that have to work together belongs in the Palette Generator.