Color converter

RGB to HEX Converter

Convert red, green, and blue channel values into a six-digit HEX color.

Each RGB channel must be an integer from 0 to 255.

What this tool does

RGB and HEX store the same red, green, and blue channel information. The conversion rewrites each decimal 0–255 channel as a two-digit base-16 value.

Enter the values in the calculator above and choose Calculate. The calculation runs in your browser; the inputs are not intentionally sent to a Colormapped application server.

How it works

  1. Validate that red, green, and blue are whole numbers from 0 to 255.
  2. Convert each decimal channel to hexadecimal.
  3. Pad a one-digit result with a leading zero.
  4. Join the three pairs after a # in red-green-blue order.

Worked example

Inputrgb(91, 92, 240)
Output#5B5CF0

91 becomes 5B, 92 becomes 5C, and 240 becomes F0, so the three pairs join as #5B5CF0.

When to use it

  • Turn channel values from graphics code into a compact CSS/design-token value.
  • Normalize an RGB color for documentation or a style guide.
  • Move a color from an API or Canvas result into tools that prefer HEX.

Accuracy and limits

  • RGB inputs are integer channels only in this tool.
  • The result has six HEX digits and does not include alpha/transparency.

Useful next steps