RGB to HEX converter.
Type red, green and blue values (0 to 255, or percentages) and get the six digit HEX code used in CSS, Figma and Tailwind.
Three values 0 to 255, or percentages. rgb( ) wrapper optional.
Type red, green and blue values (0 to 255, or percentages) and get the six digit HEX code used in CSS, Figma and Tailwind.
Three values 0 to 255, or percentages. rgb( ) wrapper optional.
RGB to HEX converts red, green and blue values (0 to 255 each) into the six-digit hexadecimal code used in CSS and design tools. rgb(27, 77, 228) becomes #1B4DE4.
Each channel from 0 to 255 is written as two hexadecimal digits: divide by 16 for the first digit and take the remainder for the second, using A to F for 10 to 15. 228 is 14 times 16 plus 4, so E4. Join the three pairs after a hash. The converter accepts rgb(), comma-separated numbers or percentages, and rgba() with alpha, which becomes an eight-digit HEX.
HEX is the default in CSS, HTML, Figma, Sketch, Tailwind config and most brand guidelines. RGB is what image software, video and code that manipulates pixels use. Both describe the same sRGB color, so the conversion is exact.
Enter the three values here or in any format the field accepts. Each value is converted to two hex digits and joined with a hash.
#000000, black. rgb(255, 255, 255) is #FFFFFF, white.
Yes. rgb(50%, 20%, 90%) is accepted and converted to #8033E6.