Color Converter

Enter a hex color code to see its RGB and HSL equivalents with individual red, green, and blue channel values.

Enter a 6-digit hex code without the # symbol (e.g. FF6B35).

Color

#FF6B35

RGBrgb(255, 107, 53)
HSLhsl(16, 100%, 60%)
Red channel255
Green channel107
Blue channel53

How to use this color converter

  1. Enter the hex color code

    Type a 6-digit hex code into the Hex color code field (e.g. FF6B35 or 00FF88). Omit the # symbol.

  2. Read the RGB values

    The Red channel, Green channel, and Blue channel results show the 0–255 values for each component.

  3. Check the HSL output

    Review the HSL result for hue (0–360°), saturation, and lightness — useful for color adjustments.

Methodology

How this color converter works

This tool converts a hexadecimal color code into RGB (red, green, blue) and HSL (hue, saturation, lightness) representations. Each hex pair maps to an 8-bit channel value (0–255), and the HSL conversion uses standard color space mathematics.

Formula
R = hex[0:2] → decimal; G = hex[2:4] → decimal; B = hex[4:6] → decimal
HEX A 6-character string of hexadecimal digits representing RGB
HSL Hue (0–360°), Saturation (0–100%), Lightness (0–100%)
Example

Hex #FF6B35 → RGB(255, 107, 53) → HSL(16, 100%, 60%).

Hex 000000 → RGB(0, 0, 0) → HSL(0, 0%, 0%) — pure black.

Hex FFFFFF → RGB(255, 255, 255) → HSL(0, 0%, 100%) — pure white. Hex 808080 → RGB(128, 128, 128) → HSL(0, 0%, 50%) — mid gray.

Assumptions
  • Input is a valid 6-digit hex color code.
  • Alpha channel is not supported in this version.
Notes
  • CMYK conversion requires a color profile and is not included here.

Understanding color models

HEX, RGB, and HSL are different ways to describe the same color. HEX encodes RGB as a 6-digit hexadecimal string: each pair of characters is one 8-bit channel (0–255). RGB expresses the same values as three numbers, the additive primary colors that screens emit. HSL (Hue, Saturation, Lightness) is a cylindrical model: hue is the angle on the color wheel (0° red, 120° green, 240° blue), saturation is color intensity, and lightness is brightness. Designers often prefer HSL when adjusting colors programmatically — changing lightness alone darkens or lightens without shifting hue, and tweaking saturation adjusts vividness.

Developer use cases for color conversion

Developers convert colors when building design systems, implementing themes, generating color palettes, and debugging CSS. Design tokens often store colors in hex; converting to RGB or HSL enables runtime calculations such as opacity overlays or accessible contrast checks. Theme switchers may need to derive lighter or darker variants from a base color using HSL. Automated accessibility tools convert colors to compute luminance and contrast ratios. When debugging layout or theming bugs, seeing a hex value as RGB or HSL helps identify which channel is off. Color conversion is also used in data visualization, chart libraries, and dynamic UI theming.

Frequently asked questions

Can I enter a 3-digit hex code?

Currently this tool expects a 6-digit code. For 3-digit shorthand like F60, expand it to FF6600 first.

What is HSL?

HSL stands for Hue, Saturation, Lightness. It is an alternative way to describe colors that some designers find more intuitive than RGB.

Written by Jan Křenek Founder and lead developer
Reviewed by DigitSum Methodology Review Formula verification and QA
Last updated Mar 11, 2026

Use this as an estimate and validate important decisions with a qualified professional.

Inputs stay in the browser unless a future feature explicitly tells you otherwise.