Colour Converter
Type a colour in any common notation — #1f5fd6, 1f5fd6, #1f5, rgb(31, 95, 214) — and all the other forms appear at once, along with the contrast figures you need for readable text.
- #1f5fd6 HEX
- rgb(31, 95, 214) RGB
- hsl(219, 75%, 48%) HSL
Contrast:
- Free
- Files never leave your device
- No sign-up
- No file limit
How to use
Good to know
Three notations for the same colour
HEX is compact and universal in CSS. RGB names the channels outright, which matters when a value is calculated rather than written by hand. HSL describes hue, saturation and lightness — the form to reach for when you want the same colour a shade lighter, because you change one number instead of guessing three.
Contrast is not decoration
Under WCAG, body text needs a ratio of at least 4.5:1 against its background, and large text at least 3:1. The two figures shown here tell you immediately whether this colour can carry white text, black text, or neither — before the design goes to a developer.
Frequently asked questions
Which formats are accepted?
Three-, four-, six- and eight-digit HEX, with or without the hash, plus rgb() and rgba() with commas or spaces. Alpha is kept and shown in the HEX value.
Why does HSL sometimes show a slightly different colour?
HSL values are rounded to whole numbers for readability, so the round trip can shift by one unit in a channel. The HEX and RGB values are exact.
Is anything sent to a server?
No. Everything is calculated on the page — brand colours from an unreleased design stay on your machine.
Related tools
- HEX to RGB Paste a HEX code and read the RGB channels. #1f5fd6 becomes rgb(31, 95, 214) — and if the code…
- RGB to HEX Paste rgb(31, 95, 214) — with commas or spaces, it does not matter — and get #1f5fd6, ready for…
- Password Generator A new password is generated the moment this page loads, using your browser's cryptographic rand…
- QR Code Generator Type a link or any text and the code appears as you type. Download it as a PNG for a screen or…
- UUID Generator Press the button and get identifiers you can paste straight into a database, a config or a test…
- Wi-Fi QR Code Type the network name and password, and the code appears. A guest points the camera at it and j…
- URL QR Code Paste the link and the code appears as you type. It points straight at your address — no shorte…