Advertisement
Color Converter
Convert between HEX, RGB and HSL color values. Includes CSS-ready output.
#4F46E5
rgb(79, 70, 229)
hsl(243, 75%, 59%)
hex
#4f46e5
rgb
rgb(79, 70, 229)
hsl
hsl(243, 75%, 59%)
rgba
rgba(79, 70, 229, 1)
Advertisement
Color formats explained
- HEX — a 6-digit hexadecimal value like
#FF5733. The most common format in web development and design tools. - RGB — three values (0–255) for Red, Green and Blue. Used in CSS as
rgb(255, 87, 51). - HSL — Hue (0–360°), Saturation (0–100%) and Lightness (0–100%). More intuitive for humans — easy to create lighter or darker shades by adjusting L.
When to use each format
- Use HEX in CSS, design specs and when copying from tools like Figma or Photoshop.
- Use RGB/RGBA when you need transparency control in CSS (
rgba(r, g, b, alpha)). - Use HSL when building design systems — it's easy to create consistent light/dark variants by only changing the L value.