Hexadecimal Colours - Meaning, Notation, Colour Codes and Examples (2024)

What is Hexadecimal?

Hexadecimal (also known as base - 16 or hex) is a number system that uses 16 different symbols to represent a particular value. The symbols used in hexadecimal are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Where, the value of

  • A = 10

  • B = 11

  • C = 12

  • D = 13

  • E = 14

  • F = 15

The place value in hexadecimal is determined by the power of 16, rather than the power of 10 that is used in the decimal form. For example,

3A4₁₆ = 316² + 1016¹ + 416⁰ = 768 + 160 + 4 = 932₁₀

As you must have understood what is hexadecimal, now let us discuss what are hexadecimal colours, hexadecimal colour notation, how does hexadecimal colour code use hexadecimal system, etc.

What are Hexadecimal Colours?

Hexadecimal colour is a method of representing colours from different colour models through hexadecimal values. The format followed in hexadecimal colours are #RRGGBB, where RR is red, GG is green, and BB is blue. The hexadecimal integers can be in the range of 00 to FF to determine the intensity of colours. Considering, 0 as the lowest value and F is the highest value, here is an example to make you understand the hex colour code appropriately.

A simple example of #FF0000 can be understood as, FF = Red, 00 = Green, and 00 = Blue

This implies that the colour is pure red, because the component of red colour has a maximum value of FF, whereas the component of blue and green colours are at their lowest of 00.

Hexadecimal Colours Notation

Hexadecimal colour notation includes (#) symbol followed by 6 different letters or numbers. The first two letters or numbers in Hexadecimal colour code represent the red colour, the next two represent the green colour, and the last two represent the blue colour. The colour values in hexadecimal colour notation range from 00 to FF ( instead of 0 to 255 in RGB).

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.

Many modern browsers also support transparency. The means that a completely new set of colour code exists in the form of #AARRGGBB. In this, you will find a combination of total 256⁴ or 4,294,976,296 colour codes. It should be noted that the addition of transparency does not indicate that there are extra colours, as only adding transparency does not change the intensity of colours. It solely means that there are more available colour codes depending on level of transparency or opacity.

How To Read Hex Colour Code?

As we know, in a hexadecimal system the values 1- 9 are represented numerically. However, for values that are 10 and higher, letters are replaced by numbers. Accordingly, A = 10, B = 11, C= 12, and so on.

Here are three steps to quickly calculate the hexadecimal numbers.

  1. Multiply the first number by 16

  2. Multiply the second number by 16

  3. Add the total together to obtain single value

For example, the number 83 in hexadecimal form is actually 131. This can be calculated as

816¹ + 316⁰ = 128 + 3 = 131

Working with letters is a similar concept. For example, the value of FF is 255 because you multiply the value of F i.e 15 by 16, then you multiply the value of F i.e 15 by 1. Then add both the values together to get a single value i.e. 255. And the number 255 in hexadecimal colour code represents the bright red colour.

Hexadecimal Colour Example

As we know, hexadecimal decimal colours on a web page are represented as # RRGGBB, where RR is red, GG is green, and BB is blue.

Accordingly,

A nice shade of blue colour can be formed by

  • Red (64/255 )

  • Green (48/255 )

  • Blue ( 255/255)

Hence, (64,48,255) in decimal form is equal to (40,30,FF) in hexadecimal. In Hex colour code, the value is coded as #4030FF.

How Hexadecimal Colour Code Use Hexadecimal Numbers To Minimise Length

There are 255 colour shades each of red, green, and blue (0 - 255) are available. If we want to obtain pure white colour, then it will be represented as #255255255.

Hexadecimal number system is used in hex colour code to represent 256 colours with the help of only two digits. Rather than counting 0,1, 2 ,3, 4, 5, 6, 7, 8, 9,10 in decimal form, it counts 0,1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F,and then 10, followed by 11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F, and then 20.

This means that 256 colour shades can be represented with only two digits, rather than 100 that are possible for a decimal number system (0 - 99). Hence, the highest possible two-digit is FF i.e. equals to 255. This is why white is represented as #FFFFFF, pure red as #FF0000, pure green as #00FF00, and pure blue as #0000FF.

Did You Know

  • Hex colour Code has 16,777, 216 possible colour combinations.

  • Hexadecimal colours are represented as #RRGGBB, where RR is red, GG is green, and BB is blue

Hexadecimal Colours Example

  • #000000 - This hex colour code represents pure black colour.

  • #FFFFFF - This hex colour code represents pure white colour.

  • #FF0000 - This hex colour code represents pure red colour.

  • #0000FF - This hex colour code represents blue colour.

  • #FFFF00 - This hex colour code represents yellow colour.

  • #00FFFF - This hex colour code represents Cyan colour.

  • #FF00FF - This hex colour code represents Magenta colour.

  • #00FF00 - This hex colour code is a mixture of red and green colour, defined as yellow.

  • #0000FF - This hex colour code is a mixture of more green and maximum blue obtains colour like the sky.

Hexadecimal Colours - Meaning, Notation, Colour Codes and Examples (2024)

FAQs

What is the hexadecimal notation for colors? ›

Hexadecimal colour is a method of representing colours from different colour models through hexadecimal values. The format followed in hexadecimal colours are #RRGGBB, where RR is red, GG is green, and BB is blue. The hexadecimal integers can be in the range of 00 to FF to determine the intensity of colours.

What are hex color codes examples? ›

List of common HTML color codes
NameHex CodeRGB Code
Green#008000rgb(0, 128, 0)
Aqua#00FFFFrgb(0, 255, 255)
Teal#008080rgb(0, 128, 128)
Blue#0000FFrgb(0, 0, 255)
12 more rows

What is the meaning of hexadecimal colour code? ›

Designers and developers use HEX colors in 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). Basically, a HEX color code is shorthand for its RGB values with a little conversion gymnastics in between.

What 3 colors are represented in hexadecimal color codes? ›

Hex Codes Represent Red, Green and Blue

A computer screen displays a color by combining red light, green light and blue light. 100% red, 100% green and 100% blue produces white. Zero red, zero green and zero blue produces black.

How do you write 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.

How do you work out the hex code of a color? ›

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 many digits is a color hex code? ›

To accurately assign a color in computer-aided graphic design, it is represented by a six-digit hexadecimal code based on the RGB model. The first two numbers represent red, followed by green and blue.

What is the difference between color and hex code? ›

HEX, or hexadecimal numbers, is a human-friendly way to communicate color to computers. There is no informational difference between RGB and HEX colors; they are simply different ways of communicating the same thing – a red, green, and blue color value.

Does every hex code have a name? ›

Not all colors have specific name. Some common colors have name. And how the name will be translated to a hex code depends on the parser. For example, CSS colors are parsed by css parser.

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

What is the purpose of the hex color code? ›

#A020F0

How to guess hex code? ›

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.

Why are HEX color codes useful? ›

Hex codes are more precise. There are over 16 million possible hex colors, but only 147 named CSS colors. So hex codes allow you to specify a wider range of shades and tints.

How to read hexadecimal numbers? ›

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.

What is the hex value of colors? ›

A hex color code is a 6‑symbol code made of up to three 2‑symbol elements. Each of the 2‑symbol elements expresses a color value from 0 to 255. The code is written using a formula that turns each value into a unique 2‑digit alphanumeric code. For example, the RGB code (224, 105, 16) is E06910 in hexadecimal code.

How do you represent RGB in hexadecimal? ›

In hex, the colour is coded as #RRGGBB , where each pair of digits RR , GG or BB represents the intensity of red, green or blue respectively as a hexadecimal value between 00 and FF (0 and 255 in decimal). You can also write rgb(RRR, GGG, BBB) to mean the same thing, where the RRR , GGG , and BBB are decimal numbers.

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.

What are the RGB colors in hexadecimal? ›

RGB to Hex color table
Color name(R,G,B)Hex
Black(0,0,0)#000000
White(255,255,255)#FFFFFF
Red(255,0,0)#FF0000
Lime(0,255,0)#00FF00
12 more rows

References

Top Articles
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 5845

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.