How to Use the RGB to HEX Converter Online
- 1Enter three whole numbers from 0 to 255 in red, green, and blue order. You can paste a function such as rgb(12, 160, 90) or enter the values directly.
- 2If you need opacity, add a fourth value from 0 to 1 using decimal notation. Use a leading zero for fractions such as 0.5.
- 3Check the resulting color. Three channels give six hexadecimal digits, and the optional opacity adds a fourth pair at the end.
- 4Copy the uppercase or lowercase result and try it in the expected CSS rule or design token field.
Input & Output Examples
Each decimal channel becomes a hexadecimal pair. The red channel is padded to two digits.
rgb(12, 160, 90)#0CA05A
Lowercase: #0ca05aThe three color pairs are followed by 80, the nearest alpha byte to 50 percent opacity.
rgba(51, 102, 153, 0.5)#33669980
Lowercase: #33669980Practical Developer Workflows
- Turn RGB values reported by design tooling into the HEX notation used by a repository’s design tokens.
- Prepare a semitransparent HEX value for a component that accepts eight-digit colors in its configuration.
- Normalize a list of individual swatches to one spelling by copying the uppercase or lowercase result for each color.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.