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
- Validate that red, green, and blue are whole numbers from 0 to 255.
- Convert each decimal channel to hexadecimal.
- Pad a one-digit result with a leading zero.
- Join the three pairs after a # in red-green-blue order.
Worked example
Input
rgb(91, 92, 240)Output
#5B5CF091 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.