HEX to RGB Converter
Convert HEX color codes to RGB and HSL — live preview as you type
Convert HEX color codes to RGB and HSL — live preview as you type
Convert any HEX color code to RGB and HSL values instantly with our free online HEX to RGB converter. The live color preview swatch updates as you type, so you can see your color in real time. All conversion is 100% client-side — your data never leaves your browser.
#FF5733 or FF5733)#1A2B3C)#RGB and #RRGGBB
A HEX color code is a 6-character hexadecimal representation of a color, prefixed with #.
Each pair of characters represents the intensity of one of the three RGB color channels:
HEX color input:
#FF5733
RGB output:
rgb(255, 87, 51)
#FFFFFF → White → rgb(255, 255, 255)#000000 → Black → rgb(0, 0, 0)#FF0000 → Red → rgb(255, 0, 0)#00FF00 → Green → rgb(0, 255, 0)#0000FF → Blue → rgb(0, 0, 255)#FFFF00 → Yellow → rgb(255, 255, 0)#FFA500 → Orange → rgb(255, 165, 0)#808080 → Gray → rgb(128, 128, 128)RGB (Red, Green, Blue) represents colors as three numbers between 0 and 255, indicating how much of each primary color to mix. It's the native format for CSS and many design tools.
HEX (Hexadecimal) is a compact string representation using base-16 numbers.
It encodes the same RGB values but in a single string: #RRGGBB. HEX is commonly
used in design systems, CSS, and as a compact color identifier.
Both formats represent the same color. This tool converts between them instantly, so you can use whichever format your project requires.
HSL (Hue, Saturation, Lightness) represents colors using three values:
HSL is often easier to work with for design because adjusting saturation or lightness is more intuitive than tweaking RGB values. Many CSS variable systems use HSL for theming.
# that represents an RGB color. Each pair of characters (00–FF) represents the intensity of red, green, and blue. For example, #FF5733 means red=255, green=87, blue=51.#FFF or #ABC are automatically expanded to their full 6-character form (#FFFFFF and #AABBCC respectively) before conversion.#RRGGBB) in base-16. RGB is more human-readable; HEX is more compact and commonly used in CSS and design tools.