Pick a Color and Convert HEX Values
Choose a color or enter a HEX code to view its HEX, RGB, and HSL values.
What Is a HEX Color Code?
A HEX color code is a six-character combination used to represent a color in web design. It begins with a hash symbol and uses numbers from zero to nine and letters from A to F. The first two characters describe red, the next two describe green, and the final two describe blue.
For example, #FFFFFF represents white, #000000 represents black, and #2563EB represents a shade of blue. HEX values are widely used in CSS, website builders, design systems, and branding guidelines.
HEX, RGB, and HSL Explained
HEX is compact and convenient for web code. RGB describes a color using red, green, and blue values from zero to 255. HSL describes hue, saturation, and lightness, which can be easier to understand when adjusting a color visually.
The same color can be represented in all three formats. Converting between them is useful when moving from a design application to a website or when creating consistent colors for buttons, backgrounds, text, and borders.
How to Use This Color Converter
Click the color field to open the browser color picker, or type a six-digit HEX code into the text field. The preview updates automatically and displays the matching RGB and HSL values. Use the copy button to copy all three values for your project.
Frequently Asked Questions
What is the difference between HEX and RGB?
Both formats describe the same color. HEX uses a compact six-character notation, while RGB lists separate red, green, and blue values.
What does the hash symbol mean in a HEX code?
The hash symbol identifies the following characters as a hexadecimal color value in common web and CSS notation.
Can I use these values in CSS?
Yes. HEX, RGB, and HSL values can all be used in CSS color properties such as background-color, color, and border-color.