Color Converter | HEX to RGB and HSL Online
Convert HEX colors to RGB and HSL values instantly. 100% free, works in browser — no data sent to server.
Online color converter tool
Converted Values
HEX vs RGB vs HSL: CSS Color Formats Guide
Modern CSS supports multiple color formats. Choosing the right format makes your stylesheets easier to maintain, theme, and animate.
HEX Color Codes (#RRGGBB)
HEX is a 6-digit hexadecimal representation of Red, Green, and Blue intensities from 00 (0) to FF (255). It is the most compact format in stylesheets and design software like Figma.
color: #ff6c37; /* 6-digit HEX */
color: #f63; /* 3-digit shorthand */
color: #ff6c37cc; /* 8-digit with alpha (80% opacity) */RGB & RGBA (Red, Green, Blue)
RGB uses decimal numbers from 0 to 255 for each channel. Ideal when manipulating channel intensities directly with JavaScript or setting transparency.
color: rgb(255, 108, 55);
color: rgba(255, 108, 55, 0.8);
color: rgb(255 108 55 / 80%); /* Modern CSS syntax */HSL & HSLA (Hue, Saturation, Lightness)
HSL represents color using an angle on the color wheel (0–360°), saturation (0–100%), and lightness (0–100%). It is the easiest model for creating color palettes, hover states, and dark/light theme variants.
color: hsl(16, 100%, 61%);
/* Darker hover state: decrease lightness */
background: hsl(16, 100%, 50%);Instant One-Click Copy
Click on any output field above (HEX, RGB, or HSL) to instantly copy the CSS-ready snippet to your clipboard. All conversions run locally in real time.
Frequently Asked Questions
How do I convert a HEX color to RGB?
Enter your HEX color code (with or without the # prefix) and our converter instantly shows the equivalent RGB and HSL values. The conversion happens in real time directly in your browser.
What is the difference between RGB and HSL?
RGB defines colors using red, green, and blue channel intensities (0–255). HSL uses hue (0–360°), saturation (0–100%), and lightness (0–100%), making it more intuitive for adjusting colors in design.
Can I use 3-digit HEX codes?
Yes. Our converter accepts both 3-digit (#abc) and 6-digit (#aabbcc) HEX color codes. A 3-digit code is automatically expanded to its 6-digit equivalent before conversion.
Are the converted color values accurate?
All conversions follow the standard sRGB color model formulas. The results are mathematically precise and match the values used by browsers, design tools like Figma, and CSS specifications.