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.
Last updated: 7 November 2026
Input limits and rounding
The text field accepts a complete six-digit HEX value, with or without the leading #. This version has no separate RGB, HSL, three-digit HEX, or alpha input. Invalid or incomplete HEX clears the displayed values and disables Copy until a complete valid value is entered.
RGB channels are integers from 0 to 255. HSL hue, saturation, and lightness are rounded to whole numbers, so the displayed HSL notation is an approximation. For example, #FF0000 gives rgb(255, 0, 0) and hsl(0, 100%, 50%). Conversion does not check contrast or decide whether a text/background pair is readable.
Read how to choose between HEX, RGB, and HSL and check color context. See the Privacy Policy for website data handling.