Hex to RGB Converter
Convert a three- or six-digit hex colour to RGB.
Open toolConvert whole-number RGB channels into an uppercase six-digit hex colour. Enter red, green, and blue values from 0 to 255, then preview and copy the result.
Update the inputs to see your result.
Result will appear here
Three whole-number RGB channels become three two-digit hexadecimal pairs.
Each whole-number channel is converted into two hexadecimal digits with a leading zero when needed. The three pairs are joined after a hash in red, green, blue order and formatted with uppercase letters.
Only opaque 24-bit RGB colours are included. Alpha/transparency is not modelled.

Review the input parameters, allowed value ranges, and worked reference cases for the RGB to Hex Converter below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: Red | 108 | Range: 0 to 255 | Required workspace parameter |
| Input: Green | 76 | Range: 0 to 255 | Required workspace parameter |
| Input: Blue | 232 | Range: 0 to 255 | Required workspace parameter |
Enter three whole number channels in red, green and blue order.
Enter red, green, and blue as whole numbers from zero to 255. Keep the channel order clear when copying values from another source. The current form represents an opaque RGB colour without an opacity input.
Select Convert color and read the uppercase six-digit hex output beside the matching preview. Each RGB channel becomes a two-digit hex pair, including a leading zero when needed. The three pairs are combined in red, green, blue order.
Review the supporting CSS RGB expression, then use Copy result or select the generated hex text. Keep the leading hash where the destination expects CSS notation. The output does not include transparency or apply the colour to another website.
Compare baseline and alternative runs for RGB to Hex Converter before exporting the result.
A hypothetical RGB color with channels 170, 187 and 204 produces #AABBCC. Use the red, green and blue fields in that order. The example provides a clear check on the conversion without claiming a particular display or profile match.

Copy the hex result when a CSS rule or design token expects that notation. Place it in the intended property yourself. This page does not edit the target style or decide whether the color provides enough contrast against surrounding content.

Enter the generated hex into Hex to RGB Converter and compare all three channels with the originals. This verifies notation consistency for the accepted opaque values. The reverse check does not add an alpha channel or convert the color into another space.

Review the calculated output alongside your entered parameters and unit conventions.
Every calculation follows the rule: Convert each 0-255 channel to two hexadecimal digits and combine as #RRGGBB. Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.
Always cross-check the displayed result against the scope note (Only opaque 24-bit RGB colours are included. Alpha/transparency is not modelled) before applying the value to production specifications, financial models, or lab records.

Check integer channel bounds and the destination’s expected notation.
Operational scope: Only opaque 24-bit RGB colours are included. Alpha/transparency is not modelled. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.
Need an adjacent calculation in Color & Design? Use the related tools linked below to chain your workflow without leaving your browser.

Choose another tool for your next calculation, conversion, or text task.

Convert opaque RGB channels into CSS hsl() notation.
Open tool
Convert opaque RGB channels to hue, saturation and value percentages.
Open tool
Convert HSV hue, saturation and value into rounded opaque RGB channels.
Open tool
Read the RGBA values at one integer-pixel position and print hex and CSS forms.
Open toolAnswers about using RGB to Hex Converter and understanding its results.
Each channel must be a whole number between 0 and 255.
Yes. Output uses uppercase A-F.
No. Each channel must be a whole number between zero and 255.
No. This converter outputs an opaque six-digit RGB hex colour. It does not include an alpha channel.
Choose another tool for your next calculation, conversion, or text task.