littlekit.
Free. No account.

HEX ↔ RGB

HEX encodes three 8-bit sRGB channels in base 16; RGB shows them as decimal values.

Your inputs stay in your browser. No account required.
Loading tool controls…

How HEX ↔ RGB works

HEX encodes three 8-bit sRGB channels in base 16; RGB shows them as decimal values.

Try an example

#ff0000 ↔ rgb(255, 0, 0).

Good to know

Opaque sRGB colours only. RGB channels may be rounded when converting to HEX.

Your privacy

Processing happens on this device for this tool. We do not upload your input, put it in share links or save it to your favourites. Closing this tab discards the working input; downloaded results remain wherever you save them.

When this tool is useful

Use HEX ↔ RGB when a design token, browser inspector or code sample uses a different colour notation than your stylesheet or design file.

How to use it

  1. Enter a valid three- or six-digit HEX value or the red, green and blue channels.
  2. Read the converted representation and copy the notation needed by your next tool.
  3. Check alpha/transparency separately because this converter describes opaque colours.

Checks before you rely on the result

  • Values are clamped to the documented channel range rather than guessed.
  • HEX and RGB describe the same colour space representation here; they do not encode a full colour-management profile.
  • Use the contrast checker afterward when the value will be used for text or controls.

This page is maintained with the tool implementation and its deterministic tests. If the result looks wrong, report the issue with a non-sensitive example.

Read the HEX ↔ RGB instructions

A useful next step

Made for clarity. Built to be useful.Report an issue