Color Converter
Type or pick a color and copy it in any format.
How the Color Converter works
The converter accepts HEX in 3, 4, 6 or 8 digits, RGB and RGBA, HSL and HSLA, and standard CSS color names, and shows the same color in every other format. Alpha is preserved where it makes sense.
The contrast panel measures the color against white and black text using the WCAG formula and labels the result AA, AAA or fail, which helps you choose readable text on a colored background.
Color Converter examples
Convert HEX color to RGB and HSL
Input
#ff6600
Result
RGB: rgb(255, 102, 0) HSL: hsl(24, 100%, 50%) CMYK: cmyk(0%, 60%, 100%, 0%)
When it is useful
- •Translating a design tool value into CSS.
- •Finding an accessible text color for a brand color.
- •Preparing print colors by checking CMYK values.
- •Building color scales by adjusting HSL lightness.
Frequently Asked Questions
Is the CMYK value exact?
It is a mathematical conversion. Real print results depend on the printer, paper and color profile, so use it as an approximation.
What contrast ratio do I need?
WCAG asks for at least 4.5 to 1 for normal text and 3 to 1 for large text at level AA. Level AAA asks for 7 to 1 for normal text.
Can I type a color name?
Yes, any standard CSS color name such as tomato or rebeccapurple.
Guides that use this tool
Related tools
- CSS FormatterPaste CSS and get tidy, consistently indented code, or a compact minified version.
- SCSS FormatterClean up SCSS so that nesting and declarations read clearly.
- Hex to Text ConverterDecode a hex dump to text, or turn text into hex bytes.
- Number Base ConverterEnter a number in any base and see it in all the common ones.