Free tool • Runs in your browser
Color converter
Convert colours between HEX, RGB, HSL and HSV, and check their contrast.
Quick answer
Enter a colour in any common format to see the others. The contrast ratios against white and black show which text colour is easier to read. WCAG AA asks for at least 4.5:1 for normal text.
How to use it
- Enter a colour or use the picker.
- Copy the format you need.
- Check the contrast results.
Example
#C1FF14
rgb(193, 255, 20) hsl(76, 100%, 54%)
Common errors and how to fix them
- The colour is not recognised
- Use a format like #C1FF14, rgb(193, 255, 20) or hsl(76, 100%, 54%).
Frequently asked questions
How do I convert HEX to RGB?
Enter the HEX code here and copy the RGB value.
What is the formula for converting HEX to RGB?
Split the code into three pairs and convert each from base 16 to base 10. For example, C1 becomes 193.
How do I convert HEX to RGBA?
Convert it to RGB here, then add an alpha value yourself, as in rgba(193, 255, 20, 0.5). This tool does not convert transparency.
How do I convert HEX to RGB in JavaScript?
Use parseInt on each pair with base 16, as in parseInt("C1", 16).
How do I convert HEX to RGB in Python?
Use int on each pair with base 16, as in int("C1", 16).
How do I convert HEX to RGB in CSS?
You usually do not need to, as CSS accepts both formats. Convert it here if you want to write the rgb() form.
What is the difference between HEX, RGB and CMYK?
HEX and RGB describe screen colours in different notation. CMYK is for printing, and this tool does not convert it.
What is a good colour contrast ratio?
WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text. This tool checks your colour against white and black.
Why do converted values not match exactly?
HSL and HSV values are rounded, so converting back can differ slightly.
Is what I enter uploaded?
No. Conversion happens in your browser and nothing is sent to Quecko.
More developer tools
Need something built for your business?
Quecko designs and builds AI, Web3 and custom software products.