Hexadecimal notation

Hexadecimal notation is a system for representing RGB colours. For example, a computer display would use the code #FF0000 to produce a bright red pixel. It is commonly used in digital applications such as web design and image processing, allowing for the accurate specification of up to 16,777,216 different colours.

  • In hexadecimal notation, each of the three RGB colour components—red, green, and blue—is assigned a value between 00 and FF, where 00 represents no intensity and FF represents maximum intensity.
  • For example:
    • Red can have a value from 00 to FF (e.g., 00).
    • Green is also assigned a value between 00 and FF (e.g., 0F).
    • Blue follows the same pattern (e.g., FF).
  • These three values form a six-digit hexadecimal triplet. For instance, the values above combine to form #000FFF, where the hash symbol (#) indicates hexadecimal notation.
  • Some common colours and their hexadecimal representations are:
    • Red (#FF0000)
    • Yellow (#FFFF00)
    • Green (#00FF00)
    • Cyan (#00FFFF)
    • Blue (#0000FF)
    • Magenta (#FF00FF)
  • The differences between decimal and hexadecimal notation are:
    • In decimal notation, we count from 0 to 9, which is called a base of 10. In hexadecimal notation, we count from 0 to 15, which is a base of 16.
    • In hexadecimal, the digits 0-9 represent values from 0 to 9, while the letters A-F (or a-f) represent values from 10 to 15.
    • The hexadecimal values from 00 to FF are equivalent to 0 to 255 in decimal.
    • In the decimal system, numbers increase by powers of 10 (e.g., 10, 100, 1000), while in hexadecimal, they increase by powers of 16 (e.g., 16, 256, 4096).