Color Code Converter
Free online color code converter. Convert color values between HEX, RGB, RGBA, HSL and HSLA formats instantly. Includes a color preview and copy-to-clipboard. Runs 100% in your browser.
What is the difference between HEX, RGB and HSL?
They are three notations for the same colors. HEX (#4ADE80) is compact hexadecimal for the red, green and blue channels. RGB (rgb(74, 222, 128)) states the same three values in decimal, with RGBA adding opacity. HSL (hue, saturation, lightness) describes color the way humans think — which shade, how vivid, how bright.
Developers convert between them constantly: design tools export HEX, CSS filters and animations are easier in HSL, and JavaScript canvas work often needs raw RGB numbers.
How to use
- 01Type a HEX (#4ade80), RGB (rgb(74,222,128)) or RGBA value into the input box.
- 02Alternatively, use the colour picker to select any colour visually.
- 03Click Convert Color to see HEX, RGB, RGBA and HSL outputs.
- 04Click Copy next to any format to copy it to your clipboard.
Frequently asked questions
- What color formats does this tool support?
- This tool converts between HEX (#RRGGBB), RGB (rgb(r,g,b)), RGBA (rgba(r,g,b,a)) and HSL (hsl(h,s%,l%)). These cover the formats used in all major CSS and design tools.
- Can I use the color picker instead of typing a value?
- Yes. Click the color swatch input on the right of the text box to open your browser's native color picker. The hex value is automatically filled in and converted.
- Is there a difference between HEX and RGB?
- HEX and RGB both describe the same RGB color model — HEX is just the hexadecimal representation. #4ade80 is exactly the same color as rgb(74, 222, 128).