Hex to RGB converter

Convert a hex, RGB or HSL color and copy the format you need.

How it works, and what stays on your device

Enter #0f8, rgb(0 255 136) or hsl(152 100% 50%). Convert the color to preview it and copy its other formats.

Use RGB channels from 0 to 255 or percentages. Use percentages for HSL saturation and lightness. Alpha accepts 0 to 1 or a percentage.

Frequently asked questions

How do short hex colors work?

Each digit is doubled. #0f8 expands to #00FF88, and #0f88 expands to #00FF8888.

How do I include transparency?

Use four or eight hex digits with alpha last, or add alpha to RGB or HSL. For example, rgb(0 255 136 / 50%) is half opaque.

Why can values change slightly between formats?

Hex uses whole bytes and rounds to the nearest one. The displayed RGB and HSL values can have up to four decimal places.

Does my color leave the browser?

The conversion and preview happen on your device.