toolulu Easy · Ready · Everywhere

Your connection

…

Local time
—
Time zone
—
Reverse DNS
—
System
—
Browser
—
LogligentMonitoring & Security Intelligence Understand what your
servers are telling youAlready been hacked? Yes? No? Don't know?
Logligent detects and responds.
Sign up free

Run it. Get results.

RGB to HEX Converter

Free
Convert RGB to HEX and HEX to RGB, with alpha, the short form and the steps, or a whole list at once. Free, in your browser.
tooluluEasy · Ready · Everywhere

Use your phone as the camera

Scan this code with your phone's camera, then take a photo of the text. Its words appear here, ready to translate.

Waiting for your phone…

The code works for 15 minutes, for up to 10 photos. Photos are read, then thrown away.

Popular

Pick your tool

toolulu Easy · Ready · Everywhere

156 tools

Open this tool?

About the RGB to HEX Converter

A free RGB to HEX converter, and HEX to RGB: type red, green and blue from 0 to 255 (and alpha for see-through colours) to get the HEX code, or type a HEX code to get its RGB values. It shows the short form (#f0c) when there is one, HSL, HSV and CMYK, the steps (each number as two hex digits), and converts a whole list of colours at once. It all works in your browser.

How to use it

  1. Type red, green and blue (0–255), or drag the sliders; or type a HEX code.
  2. Read the HEX (or RGB) at once, with the steps.
  3. Copy the code, or paste a list to convert many at once.

Questions

How do I convert RGB to HEX?

Write each of red, green and blue (0–255) as two hexadecimal digits and put them together after #: rgb(255, 99, 71) is ff, 63, 47, so #ff6347.

How do I convert HEX to RGB?

Split the six digits into three pairs and turn each pair from hex to a number: #ff6347 is ff = 255, 63 = 99, 47 = 71.

What are 3-digit and 8-digit HEX codes?

#f0c is short for #ff00cc (each digit doubled); 8 digits add transparency (alpha), e.g. #0000ff80 is half see-through blue.

Does upper or lower case matter?

No: #FF6347 and #ff6347 are the same colour.

Can I convert many colours at once?

Yes: paste them one a line under "Convert a list", in any format: 255, 99, 71, rgb(…), #hex or a name.

Is anything sent?

No: it is converted in your browser.

Did you know?

256 × 256 × 256

16,777,216 colours

With 8 bits for each of red, green and blue, a pixel uses 24 bits, which gives 16,777,216 different colours.

Source: Microsoft Learn

Hex codes of 3, 4, 6 and 8 digits

3, 4, 6 or 8 digits

A CSS hex colour can have 3, 4, 6 or 8 hex digits; in #0000ffcc the last two make a slightly see-through blue.

Source: W3C (CSS Color 4)

#123 = #112233

#123 is #112233

In CSS, the three-digit #123 is the same colour as #112233: each digit is doubled.

Source: W3C (CSS Color 4)

#663399

rebeccapurple

CSS Color Level 4 added the named colour rebeccapurple, #663399, to honour web pioneer Eric Meyer.

Source: MDN Web Docs

16 VGA colours

Colour names from VGA

16 of CSS's named colours, such as aqua, fuchsia, lime and teal, come from the old VGA palette; most of the rest from the X11 colour system.

Source: W3C (CSS Color 4)

sRGB: 1996

sRGB, 1996

sRGB, the colour space that hex and rgb() values use, was proposed by Hewlett-Packard and Microsoft; version 1.10 is dated November 5, 1996.

Source: W3C

Tips for RGB and HEX

  1. 0 to 255

    Each of red, green and blue goes from 0 to 255.

  2. Two digits each

    HEX is two digits each for red, green and blue.

  3. The short form

    #f0c is the same as #ff00cc.

  4. Case doesn't matter

    #FF6347 and #ff6347 are the same.

  5. 8 digits: alpha

    8 digits? The last two set how see-through it is.

  6. Black and white

    #000000 is black, #ffffff is white.

  7. Convert a list

    Paste a list to convert many colours at once.

  8. Both work in CSS

    CSS takes #hex and rgb(): use either.

Advertisements

tooluluEasy · Ready · Everywhere

Advertisements

AcesFive