Tutorial #16:
|
These are the most used ways of getting colors on your site, and they are useful because they are very specific. So read on, it's worth the time!When I was introduced to hex, it looked really strange. So I looked for a tutorial, and all that I got was many of those pretty little charts that have 50 colors. So I had to try to figure out hexadecimal myself, and eventually, I got the basics down. To do that, I had to know the RGB system. It can be used too, but I don't like it as much as hex. You follow the tutorial and decide for yourself. I'm not going to give you the color chart. You've probably seen that a million times. I'm going to try to actually teach you hex AND rgb.
Let's get started!The RGB system comes first. Once you understand this, you can understand hex a lot better. RGB, if you didn't figure this one out already, stands for the three primary colors: red, green, and blue. This is RGB syntax for a page.<font color="rgb(180,203,220)"> Okay, got that? Now, what's with the numbers? You can probably tell that the first number is for red, the second for green, and the third for blue. Now, about the numbers themselves. RGB is set up on a scale of 000 to 255 per primary color. So I could go from 000 to 255 for red, from 000 to 255 with green, etc. Got that? Okay, now about the order. Basic knowledge tells you that black is the absence of color. So, 000 would be black, because there is no color in 000. Therefore, rgb(000,000,000) would be black. White is all colors put together. So, 255 would be white, because that would be all of the shades combined. Therefore, white would be written as rgb(255,255,255). Well, that wraps up the RGB System. With your newly found knowledge, hexadecimal will be a little less painful. The Hexadecimal SystemIn case you don't know what a hexadecimal code looks like, take a look.#b4cbdc Confusing? It'll clear up. The first thing I want to tell you is that it is actually divided into three parts Red, green and blue. See how it is divided... # b4 cb dc Do you see how it is divided into three parts? The first part is the red color that goes into the color, the second is the green aspect, and the blue is the third. It is in the same order as RGB, if you'll notice. Now, what's with all of those letters? Our normal number system is base-ten. we have digits 1-10. However, hexadecimal runs on a base-sixteen system.Why? I'm not exactly sure, but since 16 times 16 equals 256, which is very close to the 255 colors used in the RGB system, that may have something to do with it The base-sixteen system runs like this. 1 2 3 4 5 6 7 8 9 A B C D E F 10
Count 'em up, there are sixteen digits. From here on in, don't think as A-F as letters, think of them as numbers. The best way to utilize hex is to take the RGB colors, and convert. There is a script at HTML Goodies that you can use, and, if you know the RGB number, you can use Calculator in Windows. Put it in Scientific mode, type in the number, and then click hex. The converted number will show in the display. |