Color Converter: HEX, RGB and HSL
Convert a color between HEX, RGB and HSL.
Your color
Type a HEX, RGB or HSL value, or use the picker.
Converted
#F2541Brgb(242, 84, 27)hsl(16, 89%, 53%)Contrast with white text: 3.47:1 (too low for small text). With black text: 6.06:1 (passes AA).
How to use it
- Enter a color
Type a HEX, RGB or HSL value, or pick one with the color picker.
- Read the formats
HEX, RGB and HSL appear together with a preview swatch.
- Copy what you need
Copy the format your code or design tool asks for.
This color converter turns a HEX, RGB or HSL value into the other two formats and shows a preview. It also checks the contrast against white and black text, so you can see if a color is readable. It runs in your browser.
Handy color tips
Low contrast text is hard to read for many people and can fail accessibility rules. Aim for 4.5 to 1 on body text.
Keep hue and saturation, change lightness, and you get matching light and dark versions of one color.
Paste the code from your logo file and copy the same color into CSS, Figma or a slide.
Pick HEX or HSL for your stylesheet and stay with it, so changes are easy to find.
Common questions
What is a HEX color?
What is the difference between RGB and HSL?
Does it accept short HEX codes?
What does the contrast ratio mean?
Is anything uploaded?
More free tools
Switch text to upper, lower, title, sentence, camel, snake or kebab case.
Runs in your browserMake QR codes for links, text and WiFi. Pick colors and download PNG or SVG.
Runs in your browserCompress JPEG, PNG, and WebP images directly in your browser with real-time size reduction calculations.
Runs in your browserMake strong random passwords with a strength meter. Nothing is stored or sent.
Runs in your browser