Color Converter - HEX RGB HSL Converter

Convert colors between HEX, RGB, RGBA, HSL and HSV formats with this free online color converter. Live preview and instant conversion.

#3366FF
RGB
rgb(51, 102, 255)
RGBA
rgba(51, 102, 255, 1)
HSL
hsl(225, 100%, 60%)
HSV
hsv(225, 80%, 100%)
HEX
#3366ff

What is a HEX Color?

A HEX color is a 6-digit hexadecimal representation of a color used in web design and CSS. It starts with a hash symbol (#) followed by three pairs of hexadecimal digits representing the red, green and blue components. For example, #FF0000 represents pure red (255 red, 0 green, 0 blue). HEX colors are the most common format in web development because they are compact and universally supported.

RGB vs HSL

RGB

RGB (Red, Green, Blue) represents colors as a combination of red, green and blue light. Each component ranges from 0 to 255. RGB is intuitive for machines but less intuitive for humans — it is hard to visualize how mixing red, green and blue produces a specific shade.

HSL

HSL (Hue, Saturation, Lightness) represents colors in a way that matches human perception. Hue is the color type (0-360 degrees on the color wheel), saturation is the intensity (0-100%), and lightness is the brightness (0-100%). HSL is more intuitive for designers and makes it easy to create color variations.

Color Format Examples

HEX#3366FF — Used in CSS, HTML, and web development. 6-digit hexadecimal, supports shorthand (#36F).
RGBrgb(51, 102, 255) — Used in CSS. Each value from 0 to 255.
RGBArgba(51, 102, 255, 0.8) — RGB with alpha transparency (0.0 to 1.0).
HSLhsl(225, 100%, 60%) — Hue (0-360), Saturation and Lightness (0-100%).
HSVhsv(225, 80%, 100%) — Hue, Saturation and Value. Used in graphics software and color pickers.

How to Use Color Converter

  1. 1

    Pick a color using the color picker or enter a HEX/RGB value

  2. 2

    See all color formats update instantly — HEX, RGB, RGBA, HSL and HSV

  3. 3

    Click "Random Color" to discover new colors

  4. 4

    Use the copy buttons to copy any format to your clipboard

Frequently Asked Questions

How do I convert HEX to RGB?

HEX colors are simply a hexadecimal representation of RGB values. To convert HEX to RGB: split the 6-digit HEX code into three 2-digit groups (e.g., #FF8040 becomes FF=255, 80=128, 40=64). Each pair is a hexadecimal number representing the red, green and blue components from 0-255. Our converter does this automatically — just pick or enter any color.

What color format does CSS use?

CSS supports multiple color formats: HEX (#FF0000), RGB/rgb(255,0,0), RGBA/rgba(255,0,0,0.5), HSL/hsl(0,100%,50%), and named colors (red, blue). Modern CSS also supports newer formats like HWB, LAB, LCH, and OKLCH. HEX and RGB are the most widely supported and commonly used in web development.

What is the difference between HSL and HSV?

Both HSL and HSV use hue and saturation, but they differ in the third component. HSL uses Lightness — 50% is the pure color, 0% is black, and 100% is white. HSV uses Value (or Brightness) — 100% is the pure color, and 0% is black. HSL is more common in CSS and web design, while HSV is more common in image editing software and color pickers.

Is my data sent to a server?

No. All color conversion happens entirely in your browser using JavaScript. No data is ever uploaded or stored. Your privacy is fully protected.