Color & Design ToolsClient-Side Calculation Engine

Color Converter (HEX / RGB / HSL)

Instant HEX, RGB, and HSL color code conversions.

Color & Design Tools

Color Converter (HEX / RGB / HSL)

Convert between HEX, RGB, and HSL color representations with precise visual feedback.

Select & Convert Color

RGB Channelsrgb(59, 130, 246)
R59
G130
B246
HSL Channelshsl(217°, 91%, 60%)
H217°
S91%
L60%

Color Formats & Copy

HEX

#3B82F6

RGB

rgb(59, 130, 246)

HSL

hsl(217, 91%, 60%)

Color Harmony & Palettes

Complementary Color

#F6AF3C

Analogous Palette

Triadic Palette

Split-Complementary Palette

Monochromatic Palette

Shades & Tints

Tints (Adding White)

Shades (Adding Black)

What is the Color Converter and How Does It Work?

The Color Converter translates a color between HEX, RGB, and HSL formats instantly and in both directions - enter a value in any one format and see the equivalent values in the other two immediately, with a live swatch preview.

Calculation Formula
HEX = RGB in base-16 | HSL derived from RGB via max/min channel analysis

HEX and RGB are mathematically the same value in different number bases (base-16 vs base-10). HSL is calculated from RGB by finding the maximum and minimum channel values to determine lightness and saturation, and the relative channel differences to determine hue.

Where:
HEX= Base-16 representation, e.g. #FF0000
RGB= Base-10 red/green/blue channels, e.g. rgb(255,0,0)
HSL= Hue/saturation/lightness, e.g. hsl(0, 100%, 50%)
Worked Calculation Examples
Pure Red
Input:#FF0000
Output:rgb(255, 0, 0), hsl(0, 100%, 50%)

Maximum red channel with zero green and blue produces hue 0° (red) at full saturation and mid lightness.

A Muted Green
Input:rgb(100, 150, 100)
Output:#649664, hsl(120, 20%, 49%)

Equal-ish channels with a green bias produce a desaturated green hue around 120°.

Common Real-World Use Cases

CSS Format Conversion

Convert a designer-provided HEX code into the RGB or HSL syntax your codebase or framework prefers.

Design Handoff

Translate colors between design tools and code when different platforms expect different formats.

Learning Color Theory

See how HSL's hue/saturation/lightness values relate to a color's underlying RGB channels.

How This Compares

Color Converter vs. Color Picker

Both use the same underlying workspace. This page is for when you already have a value in one format (HEX, RGB, or HSL) and just need the equivalent in another. Color Picker is better when you're starting from scratch or want to visually explore colors rather than convert an existing one.

How to Use the Color Converter (HEX / RGB / HSL)
  1. 1Enter a color value in the HEX, RGB, or HSL field.
  2. 2The other two formats convert automatically.
  3. 3Use the live swatch preview to confirm the color looks correct.
  4. 4Copy whichever format you need for your project.
Pro Tips & Suggestions
  • •HSL is often easier for programmatically generating color variations (e.g. lighten by adjusting only the L value).
  • •RGB and HEX carry identical color information - the choice between them is purely about which syntax your tooling expects.

Frequently Asked Questions

Explore Category

Color & Design Tools

Design utilities for HEX to RGB/HSL conversions, color palette contrast, and color matching.

View All Category Tools

Related Calculators & Tools