Hex Color Picker

Key Takeaways

Popular Hex Colors — Click to Select

#FF0000Red #00FF00Lime
#0000FFBlue #FFFF00Yellow
#FF00FFMagenta #00FFFFCyan
#FFA500Orange #800080Purple
#FFC0CBPink #A52A2ABrown
#808080Gray #000000Black
#DC143CCrimson #4169E1Royal Blue
#2E8B57Sea Green #DAA520Goldenrod

A hex color picker is a tool that helps you work with hexadecimal color codes — the most widely used color format in web development. Whether you need to enter a specific hex code and see what it looks like, convert between color formats, or find the right shade for your project, this tool handles it instantly in your browser.

Type a hex code into the input field above and the preview updates in real time. You also get the equivalent RGB and HSL values, and if the color matches a CSS named color, that name is shown too. Use the color wheel to browse visually, or click any swatch in the reference table to select a popular color.

What Is a Hex Color Code?

A hex color code is a way to represent colors using the hexadecimal (base-16) number system. The format is #RRGGBB, where each pair of characters represents the intensity of one color channel:

The hexadecimal system uses 16 digits: 0-9 and A-F. The value 00 means zero intensity (none of that color) and FF means full intensity (maximum of that color). Combining different levels of red, green, and blue produces over 16.7 million unique colors.

For example, #FF5733 breaks down as: Red = FF (255), Green = 57 (87), Blue = 33 (51). This produces a warm orange-red color. The hex code #000000 is black (all channels off) and #FFFFFF is white (all channels at maximum).

Shorthand Hex Notation

CSS supports a shorthand version of hex codes where each channel is represented by a single character instead of two. This works when both digits in each pair are identical. The browser doubles each character automatically:

Shorthand notation saves a few characters in your CSS and is commonly used for simple colors. However, most specific colors like #2563EB cannot be expressed in shorthand because their digit pairs are not identical. Use shorthand when you can, but do not worry about it for precise color values.

How to Read and Write Hex Codes

Reading hex codes becomes intuitive with practice. Here are the key patterns to recognize:

Hex Colors in Web Design and CSS

Hex codes are the default color format in CSS because they are compact and universally supported. Every web browser since the earliest days of the internet has understood hex colors. Here is how you use them in CSS:

Modern CSS also supports eight-digit hex codes where the last two characters represent alpha (opacity). For example, #2563EB80 is the same blue at 50% opacity. The alpha range is 00 (transparent) to FF (opaque).

Popular Hex Color Codes Reference

Here are some of the most commonly used color picker hex code values in web design, organized by color family:

ColorHex CodeCSS NameUsage
#FF0000redErrors, alerts, urgency
#00FF00limeSuccess states, confirmation
#0000FFblueLinks, primary actions
#FFA500orangeWarnings, highlights
#FFFF00yellowAttention, caution
#800080purpleCreativity, premium
#808080grayNeutral text, borders
#FFFFFFwhiteBackgrounds, spacing
#000000blackPrimary text, strong contrast

Converting Hex to RGB and HSL

The hex color picker above automatically converts your hex code to both RGB and HSL. But understanding the conversion is useful:

Hex to RGB Conversion

Split the six-character hex code into three pairs. Convert each pair from base-16 to base-10. For #FF5733: FF = 255, 57 = 87, 33 = 51. The result is rgb(255, 87, 51).

Hex to HSL Conversion

First convert hex to RGB, then RGB to HSL. The HSL conversion involves finding the hue angle on the color wheel, the saturation as a percentage of the color's purity, and the lightness as the average of the maximum and minimum channel values. The math is handled automatically by this tool.

For more complex color work including visual selection and color harmonies, our HTML color picker provides additional features. To extract colors from existing images, use our color picker from image tool. And if you need a calculator for any math alongside your design work, our scientific calculator online is free and browser-based.

Frequently Asked Questions

What is a hex color code?

A hex color code is a six-character string preceded by a hash symbol (#) that represents a color in HTML and CSS. The format is #RRGGBB, where RR is the red channel, GG is green, and BB is blue. Each pair is a hexadecimal number from 00 (none) to FF (full intensity). For example, #FF0000 is pure red and #000000 is black.

How do I convert a hex color to RGB?

Split the six-character code into three pairs (RR, GG, BB) and convert each pair from hexadecimal to decimal. For example, #FF5733 becomes R=255, G=87, B=51. The hex color picker tool above does this conversion automatically.

What is shorthand hex notation?

Shorthand hex notation uses three characters instead of six. It works when both digits in each pair are the same. For example, #FF0000 can be written as #F00, and #AABBCC can be written as #ABC. Shorthand is supported in all browsers.

What are the most common hex color codes?

The most commonly used hex codes include #000000 (black), #FFFFFF (white), #FF0000 (red), #00FF00 (green/lime), #0000FF (blue), #FFFF00 (yellow), #FFA500 (orange), #808080 (gray), and #FFC0CB (pink). CSS defines 148 named colors that map to specific hex values.

Is #000 the same as #000000?

Yes. The three-character hex code #000 is shorthand for #000000, which is black. Each digit in the shorthand is doubled: #000 becomes #00-00-00. This works for any hex code where each pair has identical digits, like #FFF (#FFFFFF) or #F00 (#FF0000).