Color Converter

Enter one color and get it as HEX, RGB, HSL and three alpha formats at once.

HEX
RGB
HSL
RGBA
HSLA
HEX8
100%

RGB Adjustment

R
G
B

Related Colors

Complementary

#f6a43b

Lighter

#6ba3f8

Darker

#2563eb

More Saturated

#0070ff

Color Format Guide

  • HEX: The most commonly used hexadecimal format on the web (#RRGGBB)
  • RGB: Red, Green, Blue values (0-255)
  • HSL: Hue, Saturation, Lightness

The input color is read as RGB numbers and written back as HEX, RGB, HSL, RGBA, HSLA and HEX8. The math runs in the page and no color value leaves it. Starting from the default #3b82f6, the opacity slider changes the output like this.

FormatOpacity 100%Opacity 50%
HEX#3b82f6#3b82f6
RGBrgb(59, 130, 246)rgb(59, 130, 246)
HSLhsl(217, 91%, 60%)hsl(217, 91%, 60%)
RGBArgba(59, 130, 246, 1)rgba(59, 130, 246, 0.5)
HSLAhsla(217, 91%, 60%, 1)hsla(217, 91%, 60%, 0.5)
HEX8#3b82f6ff#3b82f680

The last two digits of HEX8 are the opacity times 255, written in hexadecimal. 50% is 127.5, rounded to 128, which is 80.

What the input box reads

#f00 or f00 becomes #ff0000. #3b82f680 is read as a color plus an alpha, and rgb(255, 107, 53) is clamped at 255. hsl(16, 100%, 60%) is read as whole numbers and gives #ff6933. Color names such as red and the comma-free rgb(59 130 246) are not understood. HSL is shown rounded to integers, so feeding it back can shift a value by 1.

The related swatches below shift HSL: complementary adds 180 to hue, lighter and darker add or subtract 15 lightness, and the saturated swatch adds 20 saturation. In Chrome and Edge an eyedropper button samples any color on screen. To check whether a color reads on white, use the contrast checker.