TuttiTools
🎨

Color Converter

Convert colors between HEX, RGB, and HSL formats

Name cornflowerblue
HEX #6495ed
RGB rgb(100, 149, 237)
HSL hsl(219, 79%, 66%)
HWB hwb(219, 39%, 7%)
CMYK cmyk(58%, 37%, 0%, 7%)
NCol C65, 39%, 7%

Color Formats Explained

Colors on screens can be represented in several different formats, each useful in different contexts:

Each format represents the same color, just written differently.

What Does This Tool Do?

This tool converts colors between HEX, RGB, and HSL formats instantly. Enter a color in any format and see all three representations at once, along with a live preview of the color.

How to Use This Tool

  1. Enter a color value in any format — HEX, RGB, or HSL.
  2. All three formats update instantly.
  3. A color swatch shows a live preview.
  4. Copy any format with a single click.

Common Use Cases

Same Color, Three Notations

ColorHEXRGBHSL
White#ffffffrgb(255, 255, 255)hsl(0, 0%, 100%)
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)
Red#ff0000rgb(255, 0, 0)hsl(0, 100%, 50%)
Orange#ff6b35rgb(255, 107, 53)hsl(16, 100%, 60%)
Teal#10b981rgb(16, 185, 129)hsl(160, 84%, 39%)
Slate gray#64748brgb(100, 116, 139)hsl(215, 16%, 47%)

When to Prefer Each Format

A practical workflow: define your palette’s hues in HSL, derive light/dark variants by adjusting lightness, then convert to HEX for the final stylesheet.

Reading a Hue Angle

The hue value in HSL is a position on the color wheel: red, 30° orange, 60° yellow, 120° green, 180° cyan, 240° blue, 270° purple, 300° magenta, wrapping back to red at 360°. Once you internalize these anchors, you can roughly picture any HSL color from its numbers alone — a skill that makes palette tweaking dramatically faster.

Frequently Asked Questions

What about RGBA and HSLA (with transparency)?

RGBA and HSLA add an alpha channel for transparency. This tool currently handles fully opaque colors (RGB and HSL without alpha).

Why do some HEX colors have only 3 characters?

A 3-character HEX like #f60 is shorthand for #ff6600. Each digit is doubled. Both are equivalent.

Is my data private?

Yes. All conversion happens locally in your browser.

What are OKLCH and other modern color spaces?

CSS now supports perceptually uniform color spaces like OKLCH and OKLAB, where equal numeric changes look like equal visual changes — something HSL only approximates. They’re excellent for generating accessible palettes. Support for them in this tool is on our roadmap.

How do I check if two colors have enough contrast?

WCAG accessibility guidelines require a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. Contrast is computed from the relative luminance of the two colors — as a rule of thumb, if you squint and the text blends into the background, it fails. Convert both colors here to compare their lightness values as a first approximation.

Related Tools