Sliders · exact input · live preview

RGB to HEX Converter with Live Colour Preview

Dial in red, green and blue channels and get the HEX code instantly — with a live preview and paste-ready CSS.

Converted values

HEX#4fdbc8
CSSrgb(79, 219, 200)

Red

79

0x4F

Green

219

0xDB

Blue

200

0xC8

Sliders for exploration

Drag channels to explore colour space visually, then fine-tune with the number fields. It is the fastest way to understand how each channel shapes the result.

Out-of-range values clamp

Anything below 0 or above 255 is clamped to the valid range — the conversion never produces an invalid colour, no matter what you type.

Both formats, one click

Copy the HEX for stylesheets and design tools, or the rgb() string for scripts and canvas work. Identical colour, whichever format you need.

How to use the RGB to HEX converter

  1. Set the channels

    Drag the red, green and blue sliders, or type exact 0–255 values in the number fields.

  2. Watch the preview

    The swatch updates live as you adjust — no guessing what the numbers mean.

  3. Copy your format

    One click copies the HEX code or the CSS rgb() string for your stylesheet or code.

  4. Note the hex pairs

    Each channel's two-digit hex equivalent is shown — handy when reading or debugging existing HEX codes.

Conversion is exact — RGB and HEX describe the identical colour; nothing is lost in translation.

Frequently asked questions

Related tools

Need a custom tool?

We build calculators and internal tools for businesses — get in touch.

Directory last updated 2 December 2026.

Disclaimer: conversion is mathematically exact, but how the colour renders depends on your display and browser colour profile.