How to Read Hex Color Codes - Hexadecimal Color (2024)

Whether you are a digital artist who works with Adobe Creative Suite, in a 3D application, or through UX design, you’ve probably used hex colors. But even if you use hex every day, there is a good chance you might not really understand what’s going on with those letter/number combinations.That’s where this handy guide to reading hex color codes comes in.

What is a hex code?

Hex color codes are one type of HTML color code that you’ll often hear referred to as hexadecimal color or hex. The reason to use hexadecimal numbers is it’s a human-friendly representation of values in binary code.

How to Read Hex Color Codes - Hexadecimal Color (1)

What do the numbers and letters in a hex code mean?

Hex color codes start with a pound sign or hashtag (#) and are followed by six letters and/or numbers. The first two letters/numbers refer to red, the next two refer to green, and the last two refer to blue. The color values are defined in values between 00 and FF (instead of from 0 to 255 in RGB).

Numbers are used when the value is 1-9. Letters are used when the value is higher than 9. For example:

  • A=10

  • B=11

  • C=12

  • D=13

  • E=14

  • F=15

To get a hexadecimal color, follow these three steps:

  1. Multiply the first number by 16.

  2. Multiply the second number by 1.

  3. Add the two totals together.

Understanding Hex to RGB for Context

A good place to start before moving on to reading hex color codes is learning how to understand RGB colors. RGB numbers are based upon monitor settings of red, green, and blue light. By changing the RGB numbers, you’re telling your monitor how much of that particular light color you want to shine.

What are RGB color codes?

In the RGB color system, colors are presented like this:

RGB(255, 0, 0)

RGB defines the values of red (the first number), green (the second number), or blue (the third number). The number 0 signifies no representation of the color and 255 signifies the highest possible concentration of the color.

So, in the above example, you get the brightest red possible without any green or blue presented. If you wanted only green, you’d use RGB(0, 255, 0) and for blue, RGB(0, 0, 255). For other colors, you’ll use a combination of color values to achieve the look you want.

Difference between Hex color codes and RGB codes

By understanding what the numbers stand for in hex color codes, you'll be able to better predict what color you might see. There's not too much of a difference between using a hexadecimal or RGB color, except that in CSS, it's possible to also add an alpha value, so you'll really have a RGBA color.

This can be super helpful if you want to control the opacity of a color. Adding an alpha value to your RGB is certainly one of the easiest ways to change opacity.

How to read hex color codes

Once you really understand RGB you can move on and learn how to read hex codes. It’s really quite simple once you know the formula. As mentioned above, values 1-9 are stated numerically. However, for values that are 10 and higher, letters replace the numbers. So, A=10, B=11, C=12, and so on.

Now, to calculate the hexadecimal number, there are three quick steps (as also stated above):

  1. Multiply the first number (or converted number from the letter) by 16.

  2. Multiply the second number (or converted number from the letter) by 1.

  3. Add those two totals together to get a single value.

Example hex color code calculation

For example, the hexadecimal number for the number 83 is actually 131. We come to this conclusion by:

  1. Multiplying the 8 in 83 by 16 (8x16=128).

  2. Multiplying the 3 in 83 by 1 (3x1=3).

  3. Adding the two totals together (128+3=131).

Another way to think of it is:

(8x16) + (3x1) = 131

Working with letters is the same concept. For example, FF = 255 because you multiply the number that represents F (15) by 16, then multiply the number that represents the second F (15) by 1. Then add the two totals together to equal 255. Recognize that the number 255 is the same as the RGB number 255, which is bright red.

If you would rather not perform mental calculations, use anRGB to HEX conversion tool.

Estimating hex codes in the real world

Once you understand the numbers, you’ll be able to predict what a color will look like based upon the intensity of red, green, and/or blue values. So, if you know that maximum red without green or blue is #FF0000, then you can mentally adjust the values a bit to get an estimate for a different color.

Another example of a hex color code is #7DD0D7, which gives you a greenish-blue.

How to Read Hex Color Codes - Hexadecimal Color (2)

How to Read Hex Color Codes - Hexadecimal Color (3)

Common Hex to RGB conversions

It can be helpful to memorize some of the most common hex color codes, not only for when you want to use those exact colors but to help you better predict what other colors will be when seeing a hex color code.

  • Red = #FF0000 = RGB(255, 0, 0)

  • Green = #008000 = RGB(1, 128, 0)

  • Blue = #0000FF = RGB(0, 0, 255)

  • White = #FFFFFF = RGB(255,255,255)

  • Ivory = #FFFFF0 = RGB(255, 255, 240)

  • Black = #000000 = RGB(0, 0, 0)

  • Gray = #808080 = RGB(128, 128, 128)

  • Silver = #C0C0C0 = RGB(192, 192, 192)

  • Yellow = #FFFF00 = RGB(255, 255, 0)

  • Purple = #800080 = RGB(128, 0, 128)

  • Orange = FFA500 = RGB(255, 165, 0)

  • Maroon = #800000 = RGB(128, 0, 0)

  • Fuchsia = #FF00FF = RGB(255, 0, 255)

  • Lime = #00FF00 = RGB(0, 255, 0)

  • Aqua = #00FFFF = RGB(0, 255, 255)

  • Teal = #008080 = RGB(0, 128, 128)

  • Olive = #808000 = RGB(128, 128, 0)

  • Navy = #000080 = RGB(0, 0, 128)

Find more hex color codes or pick an HTML color and get its coinciding name and codes.

Beyond hex color codes: Choosing a color scheme

The quickest way to choose a color scheme for your project is to use a color palette tool that allows you to search groupings by:

  • Color

  • Style

  • Keyword

  • Hex value

  • Schemes based on what is trending or popular

The same tool allows you to generate your own scheme by randomly picking and locking in colors that you like and that look good together.

Once you have chosen a color scheme, you can:

  • Create a collage

  • Explore and create a gradient

  • Check the contrasts

  • Adjust the hue, saturation, brightness, and temperature

Each color is assigned a hex color code for you to use. In the end, you’ll have a custom color scheme that perfectly personifies your project.

But, before you settle on a palette, remember these color design tips:

  • Consider the context.

  • Refer to the color wheel.

  • Choose a monochromatic, triadic, or split complementary color scheme.

  • Think beyond the presets.

FAQs about hex color codes

We know you have more questions about hex colors, which is why we’ve put together this quick-reference FAQ section.

What does 'hex' mean?

Hex is short for Hexa, which is Greek for the number six.

When should I convert hex to RGB (or vice versa)?

While both systems work, consistency is of utmost importance. When designing for a specific brand, check their brand guide regarding which system to follow and convert colors accordingly.

How do I get the hex color code for a color in an image?

There are many free online color picker tools that make it very easy to get the hex color code for a specific image.

Generally, all you have to do is either paste in an image URL or upload your image into the color picker tool and select a color pixel. You’ll get the hex color code and RGB values.

How do I change the hex color in Adobe Illustrator?

To change the hex color in Adobe Illustrator, follow these steps:

  1. In a new Illustrator document, press F6.

  2. Double-click the stroke or fill box in the Color window.

  3. Double-click inside the box next to the #.

  4. Type the new hex color code into the box.

  5. Click OK.

Hex color tools in this guide

We’ve given you a bunch of useful tools throughout this guide, so here they are again in one place:

Wrapping up hex color codes

To wrap it all up, here are a few reminders:

  • Hex and RGB color types are for onscreen use when designing websites.

  • In CSS, it’s possible to add an alpha value to control the opacity of a color.

  • For a brand, consistency of color is key.

  • Always strive to learn more about your work by reviewing resources and taking courses, both offered by Pluralsight!

How to Read Hex Color Codes - Hexadecimal Color (2024)

FAQs

How to Read Hex Color Codes - Hexadecimal Color? ›

Hex color codes start with a pound sign or hashtag (#) and are followed by six letters and/or numbers. The first two letters/numbers refer to red, the next two refer to green, and the last two refer to blue. The color values are defined in values between 00 and FF (instead of from 0 to 255 in RGB).

How do you decode hex color code? ›

Color codes chart
Color nameHex(H,S,L)
White#FFFFFF(0°,0%,100%)
Red#FF0000(0°,100%,50%)
Lime#00FF00(120°,100%,50%)
Blue#0000FF(240°,100%,50%)
12 more rows

How do you guess the hex code of a color? ›

The first 2 digits tell us how much Red is used, the next two digits tell us how much Green there is, and you guessed it, the last 2 digits relate to how much Blue is in the mix. With this in mind, let's look at a quick example to visualize this before moving on: #000000 Is a well-known HEX code that shows as Black.

How do you describe the color of a hex code? ›

Hex Codes Represent Red, Green and Blue

Zero red, zero green and zero blue produces black. In fact, equal levels of red, green and blue, whatever that level may be, will always produce a shade of gray. The six digits of a hex code are in fact three two-digit numbers, each representing the level of red, green and blue.

How to solve hex code? ›

How to read hex color codes
  1. Multiply the first number (or converted number from the letter) by 16.
  2. Multiply the second number (or converted number from the letter) by 1.
  3. Add those two totals together to get a single value.
Nov 15, 2022

How to understand hexadecimal? ›

The first nine numbers (0 to 9) are the same ones commonly used in the decimal system. The next six two-digit numbers (10 to 15) are represented by the letters A through F. This is how the hex system uses the numbers from 0 to 9 and the capital letters A to F to represent the equivalent decimal number.

How to decipher a hex code? ›

They are always a six-digit code, which contains three pieces of information:
  1. The first two digits provide information about the amount of Red in a color.
  2. The second two digits provide information about the amount of Green.
  3. The last two digits provide information about the amount of Blue.

What is the format of a hex color code? ›

A hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color.

What is an example of a hex code? ›

HEX Value. Where rr (red), gg (green) and bb (blue) are hexadecimal values between 00 and ff (same as decimal 0-255). For example, #ff0000 is displayed as red, because red is set to its highest value (ff) and the others are set to the lowest value (00). To display black, set all values to 00, like this: #000000.

How to read a hex file? ›

Hex File Format
  1. Every line in a hex file always starts from colon (:)
  2. The first two digits CC (Character Count) represent the total number of data byte in that line. ...
  3. XXXX….. ...
  4. SS is the checksum byte of that line.

What is the difference between color code and hex code? ›

RGB is a color gamut of light using red, green, and blue to render colors onscreen. When designing for web, digital, or TV the RGB color system is used. HEX, which stands for Hexadecimal, is also used onscreen and is basically a short code for RGB color. A HEX color is a six-digit combination of letters and numbers.

How many hex codes are there? ›

How Many Hexadecimal Colours are Available? There are total 256³ or 16,777,216 colour combination available in standard #RRGGBB notation. It is because each colour values RR, GG, BB can include 256 different colour values ranging from 00 to FF. Hence the total number of colour combinations are 256³ or 16,777,216.

What does hex stand for in color? ›

HEX (hexadecimal color)

HEX colors are used in the world of web design. A HEX color is expressed as a six-digit combination of numbers and letters defined by its mix of red, green, and blue (RGB). Essentially HEX colors are a shorthand version of RGB values with some conversion gymnastics in between.

What is the purpose of the hex color code? ›

#A020F0

Does every hex code have a name? ›

No. Not every possible color value, or chromatic entity, has a name. You could guess what other color it most ressembles, but that's not a name. A color with a real name is something special, because it was important enough color to e named.

What do hex color values mean? ›

Hexadecimal code is a system by which any specific color can be described accurately to a computer, ensuring consistency and accuracy in an electronic display. A hexadecimal color value is a six-digit code preceded by a # sign; it defines a color that is used in a website or a computer program.

How do you read a hex table? ›

So Hexadecimal numbers have 16 symbols or digital values, i.e 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. A, B, C, D, E, F are single bit representations of 10, 11, 12, 13, 14 and 15 respectively. The addition of either an o prefix or an h prefix indicates Hexadecimal.

How do you read a hex address? ›

Memory addresses are displayed as two hex numbers. An example is C800:5. The part to the left of the colon (C800) is called the segment address, and the part to the right of the colon (5) is called the offset. The offset value can have as many as four hex digits.

References

Top Articles
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated:

Views: 6391

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.