You have already used hexadecimal as a compact way to represent binary values.
Web pages provide a familiar place where hexadecimal appears visually: color values.
A hexadecimal web color commonly uses six hexadecimal digits after a ## symbol.
For example:
#3366CCThe six digits are grouped into three pairs:
33 66 CCThose pairs represent the red, green, and blue parts of the color.
Screens create many colors by combining different amounts of:
A six-digit hexadecimal color can be read as:
#RRGGBBwhere:
Each pair ranges from hexadecimal:
00through:
FFThat corresponds to decimal values from 0 through 255.
Consider:
#000000The groups are:
Red = 00
Green = 00
Blue = 00With all three components at zero, the result is black.
Now consider:
#FFFFFFEach component is at its maximum hexadecimal value:
FFThe result is white.
A strong red value can be represented as:
#FF0000That means:
Red = FF
Green = 00
Blue = 00A strong green:
#00FF00A strong blue:
#0000FFThe position of the hexadecimal pair matters.
The same symbols in a different position describe a different mixture.
Consider:
#FFFF00The color contains maximum red and maximum green, with no blue.
That produces yellow.
Another example:
#00FFFFcontains green and blue at maximum values.
That produces cyan.
The goal is not to memorize a huge color chart.
The important idea is that one written hexadecimal value encodes three numeric color components.
Because one hexadecimal digit corresponds to four bits, one two-digit color component corresponds to eight bits.
For example:
FFmaps to:
11111111and:
00maps to:
00000000So:
#FF0000can be understood as three groups of eight bits:
11111111 00000000 00000000The web color is another real example of hexadecimal acting as a shorter human-readable representation of binary-oriented information.
When a color appears in HTML or CSS, you may see:
#3366CCThe ## helps indicate that the following characters form a hexadecimal color value.
The hexadecimal digits themselves are:
3366CCA small CSS example is:
h1 { color: #3366CC; }
Read it as:
You do not need to master CSS yet.
For now, notice the connection:
hexadecimal representation → digital color → visible result on a webpage
These two values represent the same color:
#3366CCand:
#3366ccHexadecimal digits A through F are not changed in value by letter case.
A project may still use one style consistently for readability.
You may encounter a three-digit form such as:
#36CIn CSS, this expands each digit:
#36Cto:
#3366CCThe six-digit form makes the red, green, and blue pairs easier to see while you are learning the representation.
The visible color is not stored on the page as a painted square.
It is represented by data.
For example:
#3366CCis text that represents three numeric color components.
The browser interprets those values and displays the resulting color.
That follows an idea you have seen throughout FIT:
digital systems use representations that software interprets to produce meaning or behavior.