Hex to RGB Converter

Turns a hex color into rgb() in the browser. Paste #rgb or #rrggbb with a leading #, then read rgb(r, g, b) plus the r, g, and b numbers. Optional reverse on this page turns rgb() or three numbers into lowercase hex. This is not a design tool.

Hex to RGB converter

Optional reverse numbers. Used when Hex and RGB are empty. Integers 0 to 255.

Client-side only. Hex and RGB are not sent to a server. Leading # is required on hex input. This is a converter, not a design tool. Input is not sent.

How to use

  1. Enter a hex color with a leading #, such as #ff0000 or the three-digit form #0f0.
  2. Read rgb(r, g, b) plus the r, g, and b numbers. Optional reverse uses rgb() or the three number fields on this same page.
  3. Nothing is sent to a server. Refreshing the page clears the form.

Results

Enter a hex color to convert to rgb().

Runs in your browser. Nothing is uploaded.

Frequently asked questions

What is the difference between #rgb and #rrggbb?

Both are hex colors. #rrggbb is six digits, one pair per channel. #rgb is the three-digit shorthand: each digit is doubled, so #0f0 becomes #00ff00, which is rgb(0, 255, 0). This converter accepts either. Output uses six-digit lowercase hex when converting back.

Is a leading # required?

Yes. Hex input must start with #. Values such as ff0000 without a hash fail closed. Surrounding whitespace is trimmed, so #ff0000 still works. Named colors and anything that is not #rgb or #rrggbb are rejected.

What rgb() format does this converter produce?

It writes rgb(r, g, b) with a space after each comma, for example rgb(255, 0, 0). r, g, and b are integers from 0 to 255. Optional reverse on this same page parses that rgb() form, or three number inputs, and returns lowercase hex such as #ff0000. Out-of-range channels fail closed.

Is this client-side? Do I need an account?

Yes, it is client-side only. There is no signup. Hex and RGB never leave the browser. Tallymill does not save what you enter. Refreshing the page clears the form.