Color Code Converter
Convert colors between HEX, RGB, and HSL, with a color picker and live preview.
HEX: #3b82f6
RGB: rgb(59, 130, 246)
HSL: hsl(217, 91%, 60%)
How to use
- Enter or change a value in the color picker, HEX, RGB (R/G/B), or HSL (H/S/L) fields
- Changing any field automatically updates all the others
- Use each row's "Copy" button to copy that representation as a string
Everything runs in your browser's JavaScript; there is no server communication.
Example
Entering #ff6347 (tomato) into HEX automatically converts to rgb(255, 99, 71) and hsl(9, 100%, 64%).
FAQ
Does it support shorthand 3-digit HEX (e.g. #f00)?
Yes, 3-digit hex codes like #f00 are supported.
Is alpha (transparency) supported?
No, only opaque RGB/HSL/HEX values are supported currently.
What happens if I enter an invalid value?
An error is shown for malformed HEX input. Out-of-range RGB/HSL numbers are automatically clamped to 0–255, 0–360, and 0–100.
Is my data stored anywhere?
No. Everything runs in your browser and disappears when you reload the page.
Category:Developer
Tags:colorhexrgbhslconverterdeveloper
Tools to use next
- Generate a QR code image from text or a URL and download it as a PNG.
- Encode text to Base64 or decode Base64 back to text. UTF-8 aware and runs entirely in your browser.
- Percent-encode strings for URLs or decode encoded strings back. Runs entirely in your browser.