Skip to content
Converter Runs offline

RGB to HEX Converter

Convert RGB and HSL colours to hexadecimal.

Input

0 chars

Output

0 chars
Ctrl

Questions

How does a hex code map to RGB?

Each pair of hex digits is one channel byte: #FF8800 is red 255, green 136, blue 0. Three-digit shorthand doubles each digit, so #F80 expands to #FF8800. An eight-digit code adds an alpha byte at the end.

When should I use HSL instead?

When building a palette. HSL separates hue from saturation and lightness, so generating a lighter tint or a complementary hue is a small arithmetic change rather than guesswork across three interdependent channels.

Open SVG Preview

SVG Preview

Render SVG markup live and export it as a data URI or PNG.

Image