What is the Colour Picker + HEX / RGB / HSL Converter?
The Colour Picker & HEX / RGB / HSL Converter is a color analysis and translation tool for UI/UX designers, front-end web developers, and digital graphic artists. Featuring an interactive visual color spectrum palette and alpha transparency sliders, it translates any selected color across HEX, RGB, RGBA, HSL, and HSLA formats in real time with one-click copying for CSS.
Different design and development environments favor distinct color models: graphic designers in Figma frequently specify HEX codes (e.g. #4F46E5), modern CSS variables leverage HSL for programmatic palette tints and shades, and canvas rendering contexts use RGB/RGBA. Having an instant cross-model converter eliminates manual guesswork.
How to Use the Colour Picker + HEX / RGB / HSL Converter
- Pick or Type Color: Use the interactive visual palette picker or paste a color code into any format field (HEX, RGB, or HSL).
- Adjust Alpha Transparency: Slide the opacity controller to test transparent RGBA / HSLA variations.
- Inspect All Conversions: All color code fields synchronize immediately in real time.
- Copy CSS Code: Click copy on your desired format to paste directly into your stylesheet.
Formula & How It Works
Color models convert through normalized RGB coordinates (0 to 1):
HEX to RGB:
R = parseInt(hex.substring(1, 3), 16)
G = parseInt(hex.substring(3, 5), 16)
B = parseInt(hex.substring(5, 7), 16)
RGB to HSL:
Let r = R/255, g = G/255, b = B/255
max = Math.max(r, g, b), min = Math.min(r, g, b)
L = (max + min) / 2
If max === min: H = S = 0 (Achromatic grey)
Else:
d = max - min
S = L > 0.5 ? d / (2 - max - min) : d / (max + min)
H = (max === r ? (g - b)/d + (g < b ? 6 : 0) :
max === g ? (b - r)/d + 2 : (r - g)/d + 4) * 60Worked Example: ToolsLand brand primary indigo: HEX #4F46E5 converts to RGB rgb(79, 70, 229) and HSL hsl(243, 75%, 59%).
Practical Worked Examples
| Color Name | HEX Code | RGB Value | HSL Value |
|---|---|---|---|
| ToolsLand Indigo | #4F46E5 | rgb(79, 70, 229) | hsl(243, 75%, 59%) |
| Amber Accent | #F59E0B | rgb(245, 158, 11) | hsl(38, 92%, 50%) |
| Slate Dark | #0F172A | rgb(15, 23, 42) | hsl(222, 47%, 11%) |
| Pure White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
Common Everyday & Professional Use Cases
Extracting color codes from brand style guides, creating semi-transparent CSS overlay backgrounds with RGBA, establishing consistent design system color tokens, and testing WCAG accessibility color contrasts.