clear colour  
clearpage1    

Introduction
The colours used in this introduction to HTML are formulated in RGB values, and written down as color="#RRGGBB". The values are in the so-called "hexadecimal" system. Further on a number of colours and their values are given. First a brief explanation is necessary about how this system works.

Colour palettes used
Images described in RGB values use 8 bits (which give 256 possible combinations) of R, G and B to form a 24 bit pixel (8+8+8).
To be able to give each colour a number, the decimal system lets us down. The RRGGBB indicates we have only two digits per primary colouravailable. In the decimal system this means that for e.g. Red we would only have 100 possible values, but we need 256. This can be done by using the hexadecimal system.

Hexadecimal
Familiar numbers are based on the decimal system, having ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. For the hexadecimal system 6 characters are introduced: A, B, C, D, E and F. In total we have a row of 16, in which A=10, B=11, C=12, D=13, E=14 and F=15. To indicate numbers higher than 15, a combination of numbers and characters is used. The first digit of the pair indicates how many times "sixteen" and the second how many times "one" will form part of the number. This system produces 16*16 = 256 possible two-digit numbers.

An example
colour1

The value for R=191
First we calculate how many times "16" is in "191", simply divide 191 by 16 = 11full times (176). Sixteen is 11 times represented, so the character to be used is "B".
We have 191 - 176 = 15 left, which gives "F" as the character to be used . The hexadecimal notation for R (191) = BF, The complete notation for this colour will be: color="#BFBFBF"

Where to find the RGB values
The example above showed you that the "Color Mixer", as used in most graphic software packages, gives the exact values for R, G and B. After recalculating these to the hexadecimal system, the result can be directly used in the HTML file.

Action
Calculate the hexadecimal values of the following RGB combinations and use them in the table produced in the previous exercise:
R17 G234 B131, R255 G136 B153 and R255 G203 B170
Results can be found in the popup note.

 
clear

 

 

 
clearHome
  previousexerc  
prevpage index nextpage
  nextexerc