HEX

#336699

RGB

#336699

rgb(51, 102, 153)

Red
Green
Blue

Help Us Improve

—

(—)

Hex to RGB converter

Convert hex to RGB and rgb() with live preview. Paste #rrggbb, copy channels—local-first, no signup.

What is a hex to RGB converter?

A hex to RGB converter decodes #rrggbb (hexadecimal) into red, green, and blue channel values—usually as rgb(r, g, b) for CSS and design tools. Use this free local-first calculator when you have a hex swatch and need decimal channels without a signup. For CMYK, HSV, and multi-model conversion, read the Hex to RGB guide on Hex To Rgb Cmyk Hsv Color Converter Guide.

Hex to RGB features

Convert hexadecimal colors to RGB with live preview.
  • Hex input first

    Paste #rrggbb or use the picker—channels follow your hex code.

  • Channel sliders

    Dial Red, Green, and Blue to fine-tune after a hex paste.

  • Copy rgb() and hsl()

    One-click copy for stylesheets and design handoffs.

  • Bidirectional edits

    Change hex or RGB—both sides stay in sync.

How to convert hex to RGB

From a hex code to copy-ready rgb().
  1. Enter HEX

    Paste #rrggbb or pick a color in the HEX field.

  2. Read RGB

    Check channel values and the rgb() string in the sidebar.

  3. Copy what you need

    Copy RGB, hsl(), or hex for your file or stylesheet.

Tips for hex and RGB

Faster color handoffs.
  • 01

    Lowercase hex in CSS

    This tool outputs lowercase #rrggbb—valid everywhere in modern CSS.

  • 02

    Sample from UI

    Eyedrop a hex on Image Color Picker, then paste it here for RGB channels.

  • 03

    Need the reverse?

    RGB sliders starting from rgb()? Open RGB to HEX instead.

  • 04

    Check contrast

    After converting text colors, verify pairs on Colour Contrast Checker.

Great for

When hex to RGB conversion helps.
  • Design tokens

    Turn brand hex codes into rgb() for CSS variables.

  • Debug styles

    See channel intensities behind a mystery # color in DevTools.

  • Specs and briefs

    Translate client hex into rgb() for motion or video tools.

Why convert here

Fast local hex to RGB conversion.
  • Local-first

    Colors never leave the browser for this tool.

  • Free

    Unlimited conversions with no signup.

  • Live preview

    Swatch updates as you edit hex or channels.

  • Related tools

    Pair with RGB to HEX and the hex color blog guide.

Technical notes

How hex to RGB works here.
Mapping
Each hex byte pair → channel 0–255; combined rgb() string.
Inputs
#rgb, #rrggbb, color picker, channel sliders, rgb() paste.
Outputs
rgb(), hsl(), and normalized lowercase hex.
Privacy
Client-side only—no network upload.

Sources & References

Color model references for hex and RGB notation.
  • “The <hex-color> CSS data type is a notation for describing the hexadecimal color syntax of an sRGB color using its primary color components (red, green, and blue) written as hexadecimal numbers.”
    — MDN Web Docs — <hex-color>

    MDN — <hex-color>: Defines #rrggbb as hexadecimal encoding of RGB channel bytes—what this tool decodes. developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/hex-color

  • “Hexadecimal (hex) string notation uses a hexadecimal value to represent each component (red, green, and blue) of an RGB color.”
    — MDN Web Docs — CSS color values

    MDN — CSS color values: Explains how hex notation maps to rgb() components. developer.mozilla.org/en-US/docs/Web/CSS/Guides/Colors/Color_values

  • “The sRGB color space is an RGB color space with defined chromaticities and a defined transfer function.”
    — W3C — CSS Color Module Level 4

    W3C CSS Color Module: Defines the sRGB model behind typical web hex and rgb() values. w3.org/TR/css-color-4/

Frequently Asked Questions

Quick answers about this tool—open a question to read more.