Home | E-mail
HTML Basics - Part 7 of 12 by Matthew Bacon
Colours In the previous tutorial, you were shown how to add a background image to your page using the attribute, `BACKGROUND=""`. This tutorial describes the remaining attributes associated with the tag, `<BODY>`. HTML describes colours in HEXidecimal using the RGB (Red-Green-Blue) format, `rrggbb`.
HEXidecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F
Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
Below is a table containing a selection of colours. Click here to see a chart displaying possible `rrggbb` combinations.
`rrggbb` | Colour
`FFFFFF` | White
`000000` | Black
`FF0000` | Red
`00FF00` | Green
`0000FF` | Blue
`rrggbb` | Colour
`00FFFF` | Cyan
`FFFF00` | Yellow
`FF00FF` | Magenta
`C0C0C0` | Light grey
`808080` | Dark grey
`rrggbb` | Colour
`880000` | Dark red
`008800` | Dark green
`000088` | Dark blue
`888800` | Dark yellow
`880088` | D. Magenta
The `<BODY>` attributes that use the `rrggbb` format are: `BGCOLOR="#rrggbb"` The colour used for the background. `TEXT="#rrggbb"` The colour used for text. `LINK="#rrggbb"` The colour used for a hypertext link that has not yet been visited. `ALINK="#rrggbb"` The colour used for a hypertext link when it is being selected. `VLINK="#rrggbb"` The colour used for a hypertext link that has already been visited. This is usually the same as the colour for text. For example, `<``BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" ALINK="#00FF00" VLINK="#000000">` When you have chosen your colours, it is advisable to be consistent throughout your web site! If you'd rather allow the browser to decide the colours (most browsers allow the user to setup default values), simply leave out the attributes your not bothered about! Please note: Your browser may not dither these colours correctly!
`FFFFFF` | `FFFFFF` | `FFFFFF` | `FFFFFF` | `FFFFFF` | `FFFFFF`
`EEFFFF` | `FFEEFF` | `FFFFEE` | `EEEEFF` | `FFEEEE` | `EEFFEE`
`DDFFFF` | `FFDDFF` | `FFFFDD` | `DDDDFF` | `FFDDDD` | `DDFFDD`
`CCFFFF` | `FFCCFF` | `FFFFCC` | `CCCCFF` | `FFCCCC` | `CCFFCC`
`BBFFFF` | `FFBBFF` | `FFFFBB` | `BBBBFF` | `FFBBBB` | `BBFFBB`
`AAFFFF` | `FFAAFF` | `FFFFAA` | `AAAAFF` | `FFAAAA` | `AAFFAA`
`99FFFF` | `FF99FF` | `FFFF99` | `9999FF` | `FF9999` | `99FF99`
`88FFFF` | `FF88FF` | `FFFF88` | `8888FF` | `FF8888` | `88FF88`
`77FFFF` | `FF77FF` | `FFFF77` | `7777FF` | `FF7777` | `77FF77`
`66FFFF` | `FF66FF` | `FFFF66` | `6666FF` | `FF6666` | `66FF66`
`55FFFF` | `FF55FF` | `FFFF55` | `5555FF` | `FF5555` | `55FF55`
`44FFFF` | `FF44FF` | `FFFF44` | `4444FF` | `FF4444` | `44FF44`
`33FFFF` | `FF33FF` | `FFFF33` | `3333FF` | `FF3333` | `33FF33`
`22FFFF` | `FF22FF` | `FFFF22` | `2222FF` | `FF2222` | `22FF22`
`11FFFF` | `FF11FF` | `FFFF11` | `1111FF` | `FF1111` | `11FF11`
`00FFFF` | `FF00FF` | `FFFF00` | `0000FF` | `FF0000` | `00FF00`
`00EEEE` | `EE00EE` | `EEEE00` | `0000EE` | `EE0000` | `00EE00`
`00DDDD` | `DD00DD` | `DDDD00` | `0000DD` | `DD0000` | `00DD00`
`00CCCC` | `CC00CC` | `CCCC00` | `0000CC` | `CC0000` | `00CC00`
`00BBBB` | `BB00BB` | `BBBB00` | `0000BB` | `BB0000` | `00BB00`
`00AAAA` | `AA00AA` | `AAAA00` | `0000AA` | `AA0000` | `00AA00`
`009999` | `990099` | `999900` | `000099` | `990000` | `009900`
`008888` | `880088` | `888800` | `000088` | `880000` | `008800`
`007777` | `770077` | `777700` | `000077` | `770000` | `007700`
`006666` | `660066` | `666600` | `000066` | `660000` | `006600`
`005555` | `550055` | `555500` | `000055` | `550000` | `005500`
`004444` | `440044` | `444400` | `000044` | `440000` | `004400`
`003333` | `330033` | `333300` | `000033` | `330000` | `003300`
`002222` | `220022` | `222200` | `000022` | `220000` | `002200`
`001111` | `110011` | `111100` | `000011` | `110000` | `001100`
`000000` | `000000` | `000000` | `000000` | `000000` | `000000`
Previous | Next
MyAtari magazine - Tutorial #7, April 2001 | Contents Features Reviews Tutorials Regulars Adverts
[ Top of page ]
Copyright © 2001 MyAtari