Color Converter
Convert HEX, RGB and HSL color values instantly with a live swatch preview. Built for CSS workflows, design systems, and quick copy-paste.
Open the color picker or edit values on the right.
background: #6366F1;
When do you need to convert between HEX, RGB and HSL?
What this tool does
This color converter translates values between HEX (#RRGGBB), RGB (rgb(r,g,b)), and HSL (hsl(h,s%,l%)) with a live swatch preview. Edit any field — the others update instantly. Copy individual formats or a ready-made CSS snippet with one click. A branded color picker lets you sample visually while numeric fields stay in sync for precise design-system work.
Why you need it
Design tools, brand guidelines, and CSS use different color notations. A brand book might specify #6366F1 while your canvas API expects RGB integers, and your hover-state tokens are easier to tune in HSL because lightness and saturation are independent axes. Manual conversion is error-prone — one wrong channel produces a visibly different shade.
Front-end developers use this tool when implementing Figma specs, debugging mismatched colors between design and production, or generating rgba/hsla variants from a base HEX. Because everything runs in your browser, client brand colors and unreleased palette work never leave your device.
How to use it
- Enter a color in HEX, RGB, or HSL — any field updates the others instantly.
- Use the color picker or live swatch to confirm the color looks right on screen.
- Copy HEX, RGB, HSL, or the full CSS snippet from the toolbar or per-field buttons.
- Tweak HSL lightness or saturation for quick variations on a base brand color.
Practical examples
- Brand HEX to canvas: Paste
#E11D48and copy RGB225, 29, 72for a Chart.js or Canvas fillStyle call. - Hover state tuning: Lower HSL lightness from 67% to 55% on a primary button color without shifting hue or saturation.
- Design-system docs: Document the same swatch in HEX for designers and HSL for developers who maintain CSS custom properties.
- Accessibility checks: Adjust lightness in HSL to find a darker text-on-background pair while keeping the brand hue locked.
How it works
HEX stores 24-bit RGB as six hexadecimal digits — two each for red, green, and blue. RGB expresses the same channels as decimal integers from 0 to 255. HSL remaps those channels into hue (0–360° on the color wheel), saturation (0–100% vividness), and lightness (0–100% from black to white). The converter parses your input format, normalizes to an internal RGB triple, then derives the other representations using standard sRGB math.
When you adjust the color picker, the selected HEX value propagates through all fields. Invalid input is rejected rather than silently producing wrong colors. No values are transmitted to Kitnax servers — conversion uses client-side JavaScript only.
Common mistakes
- Confusing HSL lightness with CSS opacity: Lowering lightness darkens the color itself; opacity makes the element transparent over whatever is behind it.
- Using three-digit HEX for precise work: Shorthand like
#FFFexpands to#FFFFFFbut may not round-trip cleanly with RGB sliders — prefer six digits for token files. - Expecting alpha support: This tool handles opaque colors. Append an alpha channel manually as
rgba()orhsla()after conversion. - Ignoring color space: Values assume sRGB. Wide-gamut displays may render slightly differently than a print Pantone reference.
FAQ
Which color formats are supported?
HEX (#RRGGBB), RGB (rgb(r,g,b)), and HSL (hsl(h,s%,l%)) with live sync between fields.
Does it support alpha / transparency?
This converter focuses on opaque colors. Use rgba() or hsla() manually for alpha channels.
Are shorthand HEX values like #FFF supported?
Enter six-digit HEX for precise sync. Three-digit shorthand may expand automatically depending on input.
Can I pick colors from the screen?
Use the swatch as reference; native OS eyedroppers are not built in. Paste known values from your design tool.
Is my palette sent anywhere?
No. All conversion happens locally in your browser.