COLOR CODE CONVERTER
HEX ↔ RGB ↔ HSL ↔ RGBA ↔ HSLA · LIVE PREVIEW · COLOR PICKER
#0066FF
Click to open color picker → or type any format below
🎛️ RGB SLIDERS
R (Red)0
G (Green)102
B (Blue)255
A (Alpha)100%
🎨 SHADES & TINTS
🌈 CSS NAMED COLORS

Free Color Code Converter – HEX to RGB to HSL Online

By RapidTool Team  ·  Last updated: September 2026

Our free color code converter instantly converts colors between all major CSS formats: HEX (#rrggbb), RGB (r,g,b), RGBA (with alpha transparency), HSL (hue, saturation, lightness), and HSLA. Use the color picker, RGB sliders, or type any CSS color value to convert in real-time.

Frequently Asked Questions

What's the difference between HEX, RGB, and HSL?
HEX is a 6-digit hexadecimal representation (e.g., #ff5500) commonly used in HTML/CSS. RGB defines colors by red, green, and blue intensity (0–255). HSL uses Hue (0–360°), Saturation (0–100%), and Lightness (0–100%) — more intuitive for humans creating color palettes.
Which color format should I use in CSS?
HEX is the most compact and widely supported. Use RGBA or HSLA when you need transparency. HSL is excellent for programmatically creating color variations (just adjust saturation or lightness). Modern CSS also supports the newer oklch() and color() functions for wider gamuts.
How do I add transparency to a color?
Use RGBA: rgba(0, 102, 255, 0.5) for 50% opacity. Or HSLA: hsla(220, 100%, 50%, 0.5). The alpha value ranges from 0 (transparent) to 1 (fully opaque). In HEX, you can add 2 digits for alpha: #0066ff80 (where 80 is 50% opacity in hex).