Color Converter Online - HEX, RGB, HSL

rgb(255, 102, 0)
hsl(24, 100%, 50%)

Color Models Explained: HEX, RGB, HSL

Screens mix three primary light colors — red, green, blue — to produce every visible color. Different formats describe the same color in different ways, each useful for different contexts.

🔴 RGB — Red, Green, Blue

rgb(255, 102, 0) — each channel is an integer 0–255 (8 bits), representing how much of that primary color to mix. rgb(0,0,0) = black (no light), rgb(255,255,255) = white (full light). RGB maps directly to hardware — it's how pixel buffers, canvas APIs, and image file formats store color data. The extended version rgba() adds an alpha channel (0–1) for transparency.

# HEX — Hexadecimal

#ff6600 is just RGB in hexadecimal: ff=255 66=102 00=0. 3-digit shorthand (#f60) expands each digit: #rgb#rrggbb. 8-digit HEX (#rrggbbaa) includes the alpha channel — supported in all modern browsers and Tailwind CSS. HEX is the most common format in CSS, design tools (Figma, Sketch), and color pickers.

🎨 HSL — Hue, Saturation, Lightness

hsl(24, 100%, 50%) — a more intuitive model for humans:

HSL is excellent for programmatic color manipulation: generating shades and tints of a brand color is just incrementing or decrementing Lightness; creating analogous colors is rotating Hue by ±30°. CSS custom properties (variables) and design tokens often store colors in HSL for this reason.

🔎 Which Format to Use in CSS?

All conversions run locally in your browser.

Related Tools