Enter RGB or RGBA
Use channel values from 0 to 255. Valid decimals are rounded to the nearest whole channel.
Color conversion tool
Enter red, green, and blue channel values to get a copy-ready HEX color. Add alpha when you need an 8-digit CSS color.
Use channel values from 0 to 255. Valid decimals are rounded to the nearest whole channel.
The full value and related color formats update as you type.
#4F46E579, 70, 229rgb(79, 70, 229)hsl(243, 75%, 59%)hsv(243, 69%, 90%)Not includedRGB records red, green, and blue as three numeric channels. This converter validates each channel, rounds valid decimal inputs to the nearest whole number, and turns the result into a six-digit HEX color.
The conversion runs in this browser. Your channel values are not uploaded, and the same result is shown as a color preview, CSS syntax, HSL, and HSV so you can check it before copying.
Each RGB channel from 0 to 255 becomes one two-character base-16 pair from 00 to FF. The red, green, and blue pairs are then joined in that order after a # sign.
A channel is converted independently, so rounding happens before the three HEX pairs are assembled.
rgb(79, 70, 229) -> 4F + 46 + E5 -> #4F46E5
Turn on alpha to add transparency. The converter maps alpha from 0 through 1 to an 8-bit pair from 00 through FF and appends it after the color channels, producing CSS #RRGGBBAA notation.
Because HEX alpha has 256 possible steps, a decimal alpha value can change slightly when converted back. For example, 0.5 becomes 80 in HEX, which represents about 0.502.
HEX and rgb() syntax on this page follows the CSS Color Module Level 4.
Enter red, green, and blue values from 0 to 255. Each channel is rounded to a whole number, converted to a two-character hexadecimal pair, and combined as #RRGGBB.
Yes. Turn on alpha and enter a value from 0 to 1. The result uses CSS 8-digit #RRGGBBAA notation, with transparency in the final two characters.
RGB 255, 255, 255 is #FFFFFF. Each channel is at its maximum value, which is FF in hexadecimal.
Yes. Valid decimal channels are rounded to the nearest whole value before conversion because an 8-bit RGB channel uses an integer from 0 to 255.
No. The conversion runs locally in your browser and does not require an account.