Color Code Converter

Convert HEX/RGB/HSL (RGBA/HSLA/HEX8) + contrast ratios

100% In-BrowserNo Server UploadFree, No Signup
Design
For EngineersFastPass - AI Career Agent

AI analyzes your skills and matches you with the best opportunities. Get a free market value assessment.

Get Started Free

How to Use

  1. Enter a color code

    Enter in HEX (#RRGGBB), RGB (rgb(r,g,b)), or HSL (hsl(h,s%,l%)) format.

  2. Click Convert

    Press "Convert" to see the color in all formats with a live preview.

  3. Copy result

    Use the "Copy" button to copy the results to your clipboard.

Color Code Converter Examples

HEX → RGB/HSL

Input
#2563eb
Output
HEX:  #2563eb
HEX8: #2563ebff
RGB:  rgb(37, 99, 235)
RGBA: rgba(37, 99, 235, 1)
HSL:  hsl(221, 83%, 53%)
HSLA: hsla(221, 83%, 53%, 1)

The tool also shows a live preview and contrast ratios (white/black).

RGB → HEX/HSL

Input
rgb(255, 0, 0)
Output
HEX:  #ff0000
HEX8: #ff0000ff
RGB:  rgb(255, 0, 0)
RGBA: rgba(255, 0, 0, 1)
HSL:  hsl(0, 100%, 50%)
HSLA: hsla(0, 100%, 50%, 1)

Features

  • HEX/RGB/HSL + alpha variants (RGBA/HSLA/HEX8)
  • Color picker + alpha slider
  • Preview + contrast ratios (white/black)
  • Supports shorthand HEX (#RGB)
  • Local processing (your input is not sent to servers)
  • Dark mode support

FAQ

What is a HEX color code?

A HEX color code represents a color using a # followed by six hexadecimal digits in #RRGGBB format. Values range from 00 to FF for each channel (red, green, blue). It is the most common format in CSS and web design.

What is the difference between RGB and HSL?

RGB specifies colors using red (R), green (G), and blue (B) values from 0 to 255. HSL uses hue (H: 0-360°), saturation (S: 0-100%), and lightness (L: 0-100%), which is closer to how humans perceive colors.

Is my data sent to a server?

No. All conversion happens locally in your browser via JavaScript. No data is ever transmitted externally.