Skip to content
2xKit

Color Converter

Convert colors between HEX, RGB and HSL formats.

Formula v1.0.0GlobalMethodologyReport an issuecolor-converter-v1
How this is calculated
RGB parsed from hex pairs; HSL derived from RGB via the standard min/max chroma formula

Assumptions used in this calculation

  • Color space: Conversions assume standard sRGB color space, the default for web and most displays.

About this calculator

Different tools and codebases expect colors in different formats — a design tool might hand you a hex code while a CSS animation needs HSL values to adjust lightness, and converting between them by hand involves error-prone hex-to-decimal arithmetic and a chroma formula most people don't remember. This converter takes a hex color and computes its exact RGB equivalent by parsing each hex byte pair into a 0-255 decimal value, then derives the HSL representation from those RGB values using the standard min/max chroma formula, showing a live preview swatch alongside the numbers. It also expands shorthand 3-digit hex codes automatically, so a code like #36F converts the same as its full 6-digit form. Rather than working through hex-to-decimal conversion and a multi-step HSL derivation by hand, or trusting a color you're guessing at, you get all three representations of the exact same color instantly, correctly synced with each other.

Worked example

#3366FF

Result: rgb(51, 102, 255), hsl(225, 100%, 60%)

Was this helpful?

Frequently asked questions