[This article first appeared on MWEB iTutor]
DIY HTML - Part 3
Page 2, Hexa-what-ical?
Pronounced hex`(u)~dec'(e)_ma'(el*)...just kidding, these codes are the way you tell the browser to represent colour on your web pages.
Hexadecimal codes are made up of combinations of numbers and letters that represent a variety of colours. Variations to the numbers or letters of a hexadecimal code will change the colour.
You don't have to worry about the technicalities of hexadecimal, but if you're interested, here goes - basically, hexadecimal, or hex, is a base 16 number system that computers are fond of using. So, instead of counting to ten before going to the next decimal place, they count to sixteen before skipping to the next hexadecimal place.
So, kids in a hexadecimal universe learn to count 1-2-3-4-5-6-7-8-9-A-B-C-D-E-F and then 10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F etc.
Now, the hexadecimal code you give the browser contains three diferent numbers, one for the amount of red in the colour, one for green, and one for blue (we work in an RGB colour system). The numbers can vary between 0 and 255, which in hexadecimal, means 00 to FF. So, when you tell the browser "#FFFFFF", it reads "make red, green and blue their maximum values", which makes your screen white.
But like I said, don't worry if you can't count in hexadecimal, I can't either.
Browsers don't show colours in the same way that your monitor does. From your HTML the browser will read your hex-code and display that specific colour over the specified areas of the page. Unlike monitors that can represent numerous colours (depending on the monitor), browsers can only display 216 colours. These are made up of certain variations of hexadecimal colour codes out there.
If, for example in the case of using images, your picture holds more colours than the 216 available to the browser, then the browser will choose the nearest "web-safe" colour equivalent when displaying it.
This seems very limiting and it is really. But doing something creative with colour also probably has less to do with the colours available and more to do with your imagination. Work with simple combinations that work hard to do great things for the eye. The other important thing to remember is that a computer monitor isn't the best thing to spend time staring at. It's just not good on the eye. The best web work is often that which works with simplicity of colour use.
Where can you find these colours? Professional web designers will work with imaging software that has been built specifically for web design. These packages allow you to play with colours from a variety of palettes, from RGB, CMYK and grayscale to hexadecimal. From there you can choose a colour and manipulate it depending on the palette you're working in.
A fairly common and powerful tool for such work is Macromedia's "Fireworks" package.
This is quite complex stuff but you'll get there. What's important to know is 1. that colours are limited on browsers, that 2. when you get into serious web page design you'll need to be thinking carefully about how to manipulate and use colour (especially with images) and 3. what colours you can start to use now.
|
| 1 | 2 | 3 |
|
|
|