Generation
100% in your browser
Color Converter
Convert colors between HEX, RGB, and HSL formats instantly. Includes a color picker and a live preview swatch.
← click to open color picker
HEX
RGB
HSL
CSS values
Color Converter
Convert any color between HEX, RGB, and HSL formats instantly. Use the color picker for visual selection, or type directly into any field — all other formats update automatically.
Color formats explained
- HEX (#rrggbb): a 6-digit hexadecimal code used in HTML and CSS. The most common format for web design.
- RGB (r, g, b): defines color by red, green, and blue intensity (0–255 each). Native to screens and digital displays.
- HSL (hue, saturation, lightness): a human-friendly model. Hue is the color wheel angle (0–360°), saturation is color intensity (0–100%), lightness is brightness (0–100%).
When to use which format
- Use HEX in CSS stylesheets and design tools (Figma, Photoshop).
- Use RGB when working with canvas, WebGL, or when you need numeric channel control.
- Use HSL when building dynamic color systems (e.g. adjusting lightness programmatically for dark mode).