HEX RGB Converter
Convert colors between HEX, RGB(A) and HSL(A) with live updates, alpha support and copyable CSS values.
🔒 Runs entirely in your browser — nothing is uploadedConvert color formats without guessing
Color values often move between tools that prefer different formats. A designer might hand off a HEX token, a CSS animation might need RGB channels, and a theming adjustment may be easiest in HSL. This HEX RGB converter keeps the common web formats synchronized so you can enter the version you have and copy the version you need. The live preview also makes mistakes obvious: if a channel is typed incorrectly, the preview changes immediately.
The converter supports the everyday CSS workflow: six-digit HEX, RGB, RGBA, HSL and HSLA. Alpha is controlled separately because opacity is usually a design decision rather than part of a brand color token. Set alpha to one for opaque colors, or lower it to create overlays, focus rings, shadows and translucent backgrounds that still use the same underlying hue.
When to use RGB, RGBA, HSL or HSLA
RGB is a direct description of screen color and is useful when you are matching values from screenshots, canvas output or older design tools. RGBA adds transparency, which is convenient for overlays and subtle borders. HSL describes color in terms of hue, saturation and lightness, so it is more natural when you want to create related colors: rotate the hue for a new accent, reduce saturation for a muted state, or raise lightness for a tint. HSLA adds the same alpha control to that more readable model.
Reliable values for CSS and design tokens
Consistent conversions matter in design systems. Rounding errors or copied typos can create near-duplicate colors that are hard to notice but painful to maintain. This tool clamps RGB channels to the valid 0–255 range, keeps HSL percentages in the 0–100 range, and formats output as ready-to-paste CSS. Because it runs locally, you can safely convert unreleased product colors, client palettes or internal brand tokens without uploading them anywhere.
How to use
- Enter a valueType a HEX value or adjust RGB and HSL channels.
- Review formatsThe converter keeps HEX, RGB(A) and HSL(A) outputs synchronized.
- Copy CSSUse the copy buttons to paste the format you need into CSS, design tokens or documentation.