About this tool
Convert HEX, RGB, RGBA, HSL, HSLA, and CMYK in real time with live preview, copy actions, local history, and synced editable outputs.
The Color Code Conversion Tool takes one colour in any common CSS notation — HEX, 8-digit HEXA, rgb(), rgba(), hsl(), hsla(), cmyk() or a named colour like rebeccapurple — and returns all seven notations at once, with a live preview swatch and one-click copy. It detects the input format for you rather than making you choose it from a menu, and keeps your last 14 colours in a local history you can re-open or export as JSON. It is aimed at front-end developers and designers moving a value between a stylesheet, a design file and a print spec.
Open Color Code Conversion Tool on AltFTool — it loads instantly in your browser.
Type or paste a color into the Color Input Panel — HEX, RGB, RGBA, HSL, HSLA, CMYK or a named color such as rebeccapurple — or open the Pick color swatch beside the field; the line underneath reads 'Detected HEX. Outputs are live and copy-ready.' once it parses, and there is no convert button.
The Multi-Format Output Panel lists HEX, RGBA_HEX, RGB, RGBA, HSL, HSLA and CMYK in editable fields that all resync when you edit any one of them, Live Color Preview repaints, and Auto Detection Status names the format it detected. You can also load a screenshot in the Screenshot Color Picker panel and click any pixel to sample its color code.
Copy one value with the clipboard icon on its card, or use Copy all for every format at once and JSON / Export JSON to download color-conversion.json; the History panel keeps your last 14 valid colors in this browser — click one to reload it, or Clear history to empty the list.
Paste HEX with or without the #, a 3-, 4-, 6- or 8-digit value, a functional rgb/hsl/cmyk string, or a named colour — it works out which it is.
Transparency entered as rgba, hsla or an 8-digit hex carries through to every other output rather than being silently dropped.
The last 14 conversions are stored in your browser, re-openable in a click, and exportable as a JSON file.
Seven outputs from any one input: HEX, 8-digit HEXA with alpha, RGB, RGBA, HSL, HSLA and CMYK. Input can additionally be a named CSS colour such as rebeccapurple, cyan or orange.
As a two-digit pair appended to the six-digit hex, giving the 8-digit HEXA form. The alpha value 0 to 1 is scaled to 0-255 and written in hex, so 50 percent opacity becomes roughly 80 and full opacity is FF, which the tool omits.
It is the standard arithmetic conversion, where K equals 1 minus the largest of the normalised R, G and B values and the other channels are derived from it. That is device-independent and fine as a starting point, but real press output depends on an ICC profile and paper stock, so check proofs with your printer before committing.
Yes. A bare six- or eight-character hex string works, as does a plain comma-separated triplet like 20, 184, 166, which is read as RGB. Values outside the valid range — RGB above 255, percentages above 100 — are rejected rather than clamped silently.