-
Problems
This line enable URL Rewriting . It must be enabled via the RewriteEngine directive! and if your .htaccess file is going to use rewrite rules, you should always include this line. Otherwise, you can’t be sure if its enabled or not. The string “on” is case insensitive.
In classical numbers you have ten different figures, whereas in hexadecimal numbers you have 16 different figures.
Below are numbers from 0 to 15 in both systems:
DEC 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F
The highest hexadecimal number you can specify using one figure is F equaling 15.
With two figures the highest value is FF equaling 255.
To prevent confusion on numbers higher than 9 hexadecimal colors are often entered with a # in front of them.
In HTML, color codes have 6 digits, like #FF3C96.
RGB COLORS
Screen colors are defined by the colors Red, Green and Blue.
Therefore it is smart that HTML colors are defined in a system based on the amount of each of the three basic colors.
This system is called an RGB color system.
(Yes, - RGB stands for Red, Green and Blue!)
Most graphics tools (Photoshop, Photopaint, Paintshop Pro etc.) can handle colors in a RGB color system.
The problem is that while most graphics programs define the RGB code using normal decimal numbers, HTML defines them with hexadecimal numbers.
This means, that you have to convert between decimal and hexadecimal numbers if you want to use the same color in your graphics program and on your homepage.
HEXADECIMAL RGB
A typical color definition in HTML would look like this:
<body bgColor="#FF8C67">
The color is defined to be "#FF8C67".
The # simply states that the following numbers are hexadecimal.
The first two digits are the amount of red (FF).
Digits 3 and 4 specify the amount of green (8C).
Digits 5 and 6 specify the amount of blue (67).
Below is an example showing how different colors are mixed to obtain the desired result:
FF + 8C + 67 = FF8C67
Since there are two hexadecimal figures for each color you can specify 256 gradients of each basic color. This gives a total of 256*256*256 = 16,777,216 different combinations.
However, not all of these colors will look the same on all browsers and operating systems.
216 SAFE COLORS
Only 216 colors are what we refer to as "browser safe".
Browser safe colors are colors that look the same no matter which browser you see them on.
The reason is that browsers running on different platforms interpret the colors differently.
The only 216 colors that look the same no matter what, are the colors made out of pairs of 00, 33, 66, 99, CC and FF.
An example would be: "#990066".
You should always strive to limit your use of colors to these combinations.
The technical reason for unsafe colors is that Netscape browsers have their own color system. A system that does not match with typical graphics programs.
You can easily make a simple test of the Netscape error.
Try making a small image in your graphics program.
The image should just be a plain fill with an unsafe color.
Now convert the color value to hex.
Then make a page with the hexcolor as background.
Finally insert the image on the page.
Since you used the same RGB color for both your page and your image, the image should be invisible on the page.
But on Netscape browsers you can actually see the image
CONVERTING HEX-DEC
It's easy to convert between hex values and decimal values.
All you need is a calculator that can handle both types.
If you're using Windows, start the calculator that comes with the operating system.
Make sure the view option is set to "scientific".
Enter the decimal value.
Click the Hex field - and watch the calculator convert the number to hex.
Needless to say, you can do it the other way around to calculate decimal values from hex values.
No comments:
Post a Comment