In short: A color converter translates one color between HEX, RGB, HSL and other CSS formats, e.g. #2F6BFF = rgb(47, 107, 255) = hsl(223, 100%, 59%).
About Color Converter (HEX, RGB, HSL)
Designers hand over colors in HEX, CSS frameworks often want HSL so they can tweak lightness, and graphics code needs RGB channel values. This converter accepts any color your browser understands — #2f6bff, rgb(47 107 255), hsl(223 100% 59%) or a named color like rebeccapurple — and shows all the common formats side by side, ready to copy.
It also calculates the WCAG 2 contrast ratio of the color against white and black text. A ratio of at least 4.5:1 is needed for normal body text to meet level AA, and 3:1 for large text, so you can tell immediately whether a button color is readable.
How to use Color Converter (HEX, RGB, HSL)
- Type or paste a color in any CSS format, or use the picker.
- Copy the HEX, RGB, HSL or other value you need from the table.
- Check the contrast cards to see which text color reads better on top of it.
- Adjust the color and watch the values update live.
Examples
#2563eb = rgb(37, 99, 235) = hsl(221, 83%, 53%). White text on it scores 5.17:1, enough for AA body text. The slightly lighter #2f6bff scores 4.49:1 and just fails.
#0af expands to #00aaff.
Frequently asked questions
What is the difference between HSL and RGB?
RGB mixes red, green and blue light. HSL describes the same color as hue (angle on the color wheel), saturation and lightness, which is easier for creating lighter or darker variants.
Does it support transparency?
Yes. Colors with alpha such as #2f6bff80 or rgba(0,0,0,.5) show the alpha value in each format.
What contrast ratio do I need?
WCAG 2.1 level AA requires 4.5:1 for normal text and 3:1 for large text (at least 24px, or 18.66px bold). Level AAA requires 7:1 and 4.5:1.
Why does the picker ignore transparency?
The browser’s native color picker only supports opaque colors, so alpha is kept in the text field but not in the picker.
Updated November 2026 · Free, no signup · How we build and test tools