Color Converter (HEX, RGB, HSL)
Convert colors between HEX, RGB, and HSL with a live preview. Paste any format and copy the others. Free and fully client-side.
// color● valid
Accepts HEX, RGB(A), and HSL(A)
About this colour converter
Design tools, CSS, and APIs each prefer different colour formats. This converter takes a colour in HEX, RGB, or HSL, shows a live preview, and gives you every other format ready to copy — so you can move a value from a mockup into your stylesheet without doing the maths by hand.
Common conversions
- HEX to RGB for canvas and image work
- RGB to HEX for CSS and design handoff
- HEX or RGB to HSL for tweaking lightness and saturation
Frequently asked questions
- Which colour formats are supported?
- HEX (including shorthand and 8-digit with alpha), RGB and RGBA, and HSL and HSLA. Paste any one and the others are computed instantly.
- Does it preserve transparency?
- Yes. If your input includes an alpha channel (e.g. an 8-digit hex or an rgba/hsla value), the alpha is carried through to the other formats.
- Is the colour data sent anywhere?
- No. All conversion happens locally in your browser.
// More tools
- JSON FormatterBeautify, minify, and validate JSON with precise error locations.
- Base64 Encoder / DecoderEncode and decode Base64 for text and files, including URL-safe.
- UUID GeneratorGenerate v4 and time-ordered v7 UUIDs in bulk, ready to copy.
- Regex TesterTest regex with live highlighting, capture groups, and flags.
- YAML ValidatorValidate YAML and convert to and from JSON.
- Case ConverterConvert between camelCase, snake_case, kebab-case, and more.
- HTML Entity EncoderEscape and unescape HTML entities and special characters.
- URL EncoderPercent-encode and decode URLs and query parameters.
- Number Base ConverterConvert between binary, octal, decimal, and hexadecimal.
- Unix Timestamp ConverterConvert Unix epoch timestamps to dates and back.
- JWT DecoderDecode a JWT's header and payload with readable claim times.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256, and SHA-512 hashes from text.
- JSON ↔ CSV ConverterConvert JSON to CSV and CSV back to JSON.
- Cron Expression ExplainerTranslate a cron expression into plain English.