About Colour


Colour is displayed using one of three types of variables.

    A)   Text named colours (16 colours) ie: "red"

    B)   RGB colours, a mixing of red, green and blue to produce colour. ie: 204,102,0
         RGP is commonly used in applets and java scripts.

    C)   Hexadecimal colours or hex colours are represented by a # sign followed by
         6 numbers or letters which represent the colour. ie: #660099

* A bit about Gray Shades



   One Warning about Colours !   

       Not every ones computer can handle 32 bit colour. For example if you use colours from a 32 bit pallet to create your page. Then a computer which can only understand 265 colours views the page. That computer will use the closest colours it can create (Dithering) to view the page. I would think this to be a small portion of computers on the net, most systems are using at least 16 bit colours. When the computer dithers from 32 bit colour to 256 or 16 colours things can look a little strange.

     The image on the left is the same image as the 16 bit image on the right reduced to 256 colors. You can see how the computer tries to provide a close match in colour but has a limited pallet to work with.
     Of course if your monitor is set to 256 colours you will not see any difference in the images
.

256 colour Image
This is a 256 colour representation
 of the 32 bit colour bitmap image 
on the right.
16 bit colour Image
This is a simple colour chart 
made with a 16 bit pallet.




TEXT NAMED COLOURS


    There are 16 named colours you can use to define the colours of text, backgrounds, borders...
      For example: < Font color="RED" >SAMPLE< /FONT >

    The variables are:
        RED, YELLOW, WHITE, TEAL, SILVER, PURPLE, OLIVE, NAVY, MAROON, LIME, GRAY, GREEN, FUCHSIA, BLUE, BLACK, and AQUA

    

Click on a colour in the table 1 below and you will be able to see what that
colour text looks like on different coloured backgrounds.

RED
YELLOW
WHITE
TEAL
SILVER
PURPLE
OLIVE
NAVY
MAROON
LIME
GRAY
GREEN
FUCHSIA
BLUE
BLACK
AQUA
Table 1

Top of Page.



RGB (Red, Green, Blue) COLOURS


    RGB colours are a combination of red, green and blue colours. It is represented by three numbers separated by commas.

      For example: < Font color="#0,99,200" >SAMPLE< /FONT >

The first number represents the strength of the red colour. ie. 255,0,0
The second number is the intensity of the green colour. ie. 0,255,0
The third number is the intensity of the blue colour. ie. 0,0,255

Various combinations of these colours ranging in intensity from 0 to 255 are used to display colours.

   Examples:

             33,200,55     133,65,125     0,0,0



Place the cursor over a colour in table 2 below, the RGB colour
will be displayed in the status bar of your browser.


Table 2

Top of Page.



HEX COLOURS


     HEX colors are represented by the pound sign '#' followed by six letters or numbers or a combination of six letters and numbers.   ` A to F and 0 to 9 `

     The first two digits are for RED, the next two are for GREEN the last two digits are for BLUE.

       For example: < font color="#996600" >SAMPLE< /font >

Examples:
#FF0000      #000000      #FFFFFF      #999999      #FF9966

Place the cursor over a colour in table 3 below, the HEX colour
will be displayed in the status bar of your browser.

Table 3

Top of Page.



GREY SHADES


Grey Shades are shades of grey ranging from white to black. When used in images they create small file sizes.

Colour JPG image 11.1 Kb
Colour JPG=11096 Bytes
Grayscale JPG image 3.7 Kb
Grayscale JPG=3769 Bytes



Graycale colours are represented by:

  1. Text = GRAY
  2. HEX = When all the digits are the same number or letter a grey colour is produced.
    For example:
        #999999     #444444     #DDDDDD     #AAAAAA
  3. RGB = a gray colour is produced when the three comma separated numbers are equal.
    For example:
        #60,60,60     #80,80,80     #90,90,90     #255,255,255



RGB and HEX colour shown in status bar on mouse over.
Transparent




Let`s Move on to the infamous Popup Windows
Click here   Popup Windows   ←

This is page 16
 of Learning HTML