littlekit.
Free. No account.
Detailed tool guide

HEX ↔ RGB: instructions, examples and limits

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

Open HEX ↔ RGB
Processing location: your browser

This tool is registered for local processing. Its tool input is handled in the current page; LittleKit’s product analytics do not include the input value.

What it does

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

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. 1

    Enter a valid three- or six-digit HEX value or the red, green and blue channels.

  2. 2

    Read the converted representation and copy the notation needed by your next tool.

  3. 3

    Check alpha/transparency separately because this converter describes opaque colours.

Worked example

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

The example demonstrates the operation. For file-based tools, results depend on the selected file and options.

How the result is produced

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

Important limits

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

Checks before sharing or relying 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.

Choosing the next step

Start with the representation your design system already uses. Use the contrast checker for a foreground/background pair, then test the actual font size and weight in context. A mathematically valid colour value can still be a poor interface choice.

See a mismatch between these instructions and the tool? Report a correction with a non-sensitive example.