Convert color codes between HEX, RGB, HSL, and CMYK formats instantly. Visual color picker with live preview and one-click copy for each format. Free, no signup.
Use the color picker to visually choose a color, or type a known HEX code (e.g., #3498db) directly into the HEX field.
You can also type an RGB value (e.g., rgb(52, 152, 219)) into the RGB field — all other values update automatically.
The HEX, RGB, HSL, and CMYK values for your color update instantly. The color preview bar shows the selected color.
Click Copy HEX, Copy RGB, or Copy HSL to copy the desired format to your clipboard.
For most web development, HEX codes are the standard. For dynamic color manipulation in JavaScript, HSL is often preferred since adjusting lightness or saturation is straightforward. RGB with an alpha channel (RGBA) is used for transparency. Modern CSS also supports the oklch() and color() functions for broader color gamuts.
Vicspot's free color code converter supports all major web and print formats:
#RRGGBB — standard web/CSS formatrgb(R, G, B) — values 0–255, used in CSS and designhsl(H, S%, L%) — hue 0–360°, designer-friendlyEnter any format → all others update instantly with a live color preview bar. Includes a visual color picker.
A HEX code splits into 3 pairs — each pair is one color channel in hex:
#3498DB → 34=52 red · 98=152 green · DB=219 blue
Result: rgb(52, 152, 219)
Our free hex to rgb converter does this automatically — enter any HEX code and RGB, HSL, CMYK values appear instantly.
Use our color code converter HEX RGB HSL to switch between all formats instantly.
rgba(52, 152, 219, 0.5)Best practice: define your palette as HSL CSS custom properties, convert to HEX/RGB as needed with our CSS color converter.
Convert each RGB value (0–255) from decimal to hexadecimal and combine:
rgb(52, 152, 219): 52→34 · 152→98 · 219→DB → #3498DB
Each value needs 2 hex digits — pad with a leading zero if needed (decimal 5 = hex 05, not 5).
Our free RGB to HEX converter handles all this automatically.
HSL = Hue · Saturation · Lightness — designed to match how humans think about color:
Want a lighter blue? Increase Lightness. Want it muted? Decrease Saturation. With HEX or RGB, these changes require complex calculations — HSL makes it intuitive.
Completely private. All color conversion runs locally in your browser using JavaScript math. No data is ever sent to any server.
Verify it yourself: open DevTools → Network tab → convert a color → zero outgoing requests. Works fully offline after page loads. No account, no signup, no limits, forever free.