Converters
Color Converter
HEX, RGB, and HSL, converted live with a swatch.
🔒 Runs entirely in your browser — nothing here is ever uploaded
CalcoTools · Color Converter · generated 9/1/2026, 1:31:30 PM
About the Color Converter
Converts a color between HEX, RGB, and HSL formats simultaneously, with a live swatch preview, covering the three most common color notations in design and web development.
100% Free Runs in Your Browser No Sign-Up Required
How to use it
- Enter a Hex color, with or without the leading #.
- Read the matching RGB and HSL values, and preview the swatch.
Formula
RGB values are extracted directly from HEX digit pairs. HSL is derived from RGB using standard color-space conversion math based on the relative min/max of the red, green, and blue channels.
Worked example
The hex color #D4A24C converts to rgb(212, 162, 76) and roughly hsl(37°, 62%, 56%) — a warm gold tone.
Reference points (hand-verified against this tool's own conversion math)
| Hex | RGB | HSL |
|---|---|---|
| #000000 (Black) | rgb(0, 0, 0) | hsl(0°, 0%, 0%) |
| #FFFFFF (White) | rgb(255, 255, 255) | hsl(0°, 0%, 100%) |
| #FF0000 (Red) | rgb(255, 0, 0) | hsl(0°, 100%, 50%) |
| #00FF00 (Green) | rgb(0, 255, 0) | hsl(120°, 100%, 50%) |
| #0000FF (Blue) | rgb(0, 0, 255) | hsl(240°, 100%, 50%) |
| #808080 (Gray) | rgb(128, 128, 128) | hsl(0°, 0%, 50%) |
Recommendations
- • HSL is often more intuitive for adjusting a color — changing lightness or saturation while keeping hue fixed produces predictable tints and shades.
- • Three-character hex shorthand (like #FFF) is supported and expands automatically to the full six-digit form.
- • Use the live swatch to sanity-check a conversion visually before using the value in code or design software.
Frequently asked questions
RGB defines a color by red, green, and blue light intensities; HSL defines it by hue, saturation, and lightness — the same color described two different ways that suit different editing tasks.
Related searches
Sources
- W3C — CSS Color Module Level 4 (HSL notation) — accessed 2026-08-29