HEX to RGB Converter

Convert any hex color code to RGB. Paste, convert, copy. Part of AI color palette generator.

Quick answer: Hex and RGB are two notations for the same color. A hex code like #4CA3FF represents red (4C = 76), green (A3 = 163), and blue (FF = 255) as hexadecimal pairs.

RGB
rgb(76, 163, 255)
HSL
hsl(211, 100%, 65%)
OKLCH
oklch(0.70 0.16 252)
CSS declarations
color: rgb(76, 163, 255);
color: hsl(211, 100%, 65%);
color: oklch(0.70 0.16 252);

How it works

  1. 1

    Enter a hex code

    Type or paste any 3 or 6 digit hex value.

  2. 2

    See the conversion

    RGB, HSL, and OKLCH values appear instantly.

  3. 3

    Copy the format you need

    Click any value to copy to clipboard.

What is hex to RGB conversion?

Hex and RGB are two notations for the same color. A hex code like #4CA3FF represents red (4C = 76), green (A3 = 163), and blue (FF = 255) as hexadecimal pairs. RGB writes the same values in decimal: rgb(76, 163, 255).

Hex is standard in CSS and design tools. RGB is common in image editing software, Android development, and APIs that accept channel values. Converting between them is a formatting change, not a color space transformation. The color stays identical.

Modern CSS also supports OKLCH, a perceptually uniform color space where equal numeric steps produce equal visual changes. OKLCH is increasingly used in design systems for generating consistent shade scales.

Verify a converted pair against the WCAG contrast checker before shipping it, or pull the source colors out of artwork with generate a palette from a photo. For full token sets and exports, Pro shade scales and exports.

Common use cases

Translate a brand guideline

Convert hex from a PDF brand book into RGB and HSL for CSS, code, and print. Drop the base into the shade scale generator when you need a full ramp.

Pipe colors into a design tool

Get OKLCH for Figma variables, RGB for Sketch, and HSL for legacy stylesheets in one paste.

Build a quick CSS variable

Copy a ready-made --token: rgb(...) declaration and skip manual conversion.

Match a screenshot color

Drop the hex from your eyedropper and get every format you need without round-tripping converters.

Frequently asked questions

One color converted.

Paletta generates full shade scales from 50 to 950 for every color in your system.

Generate a system