RGB to HEX Converter
Convert RGB colors to HEX instantly. Paste a value below and copy the result.
Also in
About this conversion
RGB describes a color by its red, green, and blue light components, each from 0 to 255. It matches how screens physically produce color, which makes it the natural format for programmatic color manipulation in CSS and JavaScript.
HEX is the most common way to write colors on the web: a # followed by six hexadecimal digits, two each for the red, green, and blue channels (00-FF). Shorthand three-digit codes like #FA0 expand each digit, and the format maps one-to-one to RGB.
Converting RGB to HEX is a direct translation: each 0-255 channel value is written as a two-digit base-16 number. No rounding or color math is involved, so the conversion is exact in both directions.