Skip to content

RGB to Hex Converter

RGB to Hex Color Converter. Enter red, green and blue color levels and press the Convert button.

  • Instant results
  • Secure & private
  • Works on any device

Set color levels (0-255) for red, green, and blue, and Use it:

Share on Social Media:

What Is an RGB to Hex Converter?

Screens mix every color from red, green and blue light, each with a value from 0 to 255. The same color can be written as an RGB value such as rgb(255, 99, 71) or as a six-digit hexadecimal code such as #ff6347, which is the format most CSS and design tools use.

This converter gives you three sliders for R, G and B. Set them to the values you want and the tool shows the matching HEX, RGB and HSL codes side by side, each with its own copy button. The conversion is done by a script in your browser.

InputR, G and B sliders, 0–255 each
HEXSix-digit code, e.g. #ff6347
RGBCSS rgb() value
HSLHue, saturation and lightness

How to Convert RGB to Hex

  1. 1Set the red value — drag the R slider between 0 and 255.
  2. 2Set green and blue — adjust the G and B sliders the same way.
  3. 3Read the codes — the Hex Value, RGB Value and HSL Value fields update when you release a slider.
  4. 4Copy what you need — click the copy button next to any code and paste it into your CSS or design app.
CSS styling Web design Brand colors Graphic design Theme building Learning color models

Why Use This RGB to Hex Converter?

Three formats at once

See HEX, RGB and HSL for the same color without converting each one separately.

Mix colors visually

Sliders let you nudge a channel up or down and watch the codes change.

Copy-ready values

Each code is formatted for direct use in CSS, so you can paste it straight into a stylesheet.

Runs in your browser

The math is done by JavaScript on the page, so results appear without a page reload.

Frequently Asked Questions

Set the R, G and B sliders to your color's values. The Hex Value field shows the matching code, for example R 255, G 99, B 71 gives #ff6347.
Each channel (0–255) is written as a two-digit hexadecimal number, from 00 to ff, and the three pairs are joined in red, green, blue order after a # sign.
HSL describes the same color as hue (0–360 degrees on the color wheel), saturation and lightness (both as percentages). It is often easier to tweak by hand than RGB.
Not with this tool — it converts from the RGB sliders to HEX and HSL. The RGB values are shown alongside, so you can still read all three formats for any color you mix.
Standard 24-bit color uses 8 bits per channel, which allows 256 levels (0 to 255) for each of red, green and blue.
Yes. The HEX, rgb() and hsl() values are all valid CSS color formats and can be pasted directly into a stylesheet.
Yes. It is free to use in any browser with nothing to install.