|
The Technicolor Rainbow
A million (well, 216) psychedelic flavors |
|
Introduction Text Links Images Backgrounds Tables Colors Utilities and other tips |
|
This ain’t yer old colorin’ book hun... This is a modern, computer generated world and you have to tell your machine what pixel is what color when, for how long, etc. A computer is a very logical machine, so if you make a mistake in what you tell it to do, it’s going to act out that mistake, this is true with HTML and the most specific section of HTML is the color section. The language can only handle 256 colors (that does not mean .jpg’s are going to get converted, it is referring to things you can alter the color to in HTML) but still, that’s a lot of color to get mixed up in. There are a number of ways to tell your browser what color you want where, we’ve already been over one, the keyword method. We’ll go back over it again as well as the new methods. You are by no means required to use any certain method, it’s really what you’re most comfortable with. So, let’s just dive right in. This tutorial is getting far too long. Usage Here’s what ya do, you pick a method you like, then you pick a color using that method. Then you just look for a place where it asks for color (there are numerous already listed in this tutorial, whenever you run into one while coding, just come to this page for help on picking the right code for your color), put it in, and that’s it. For instance...in the font tag, it will ask for ‘color.’ When it does, just put it in like this... <font color="(your color here)"> and that’s it. Where ‘your color here’ is, you just use what you’ve chosen. Now on to helping you choose. The Keyword method Alright, like I told you in the text page, there are 16 keywords that are pre-designated as names of colors. The table is shown below. Following the ‘usage’ section, replace ‘your color here’ with the keyword you want. It’s just that easy.
The Hexadecimal method Here is a more advanced method. It gives you access to all 216 colors HTML can display safely in all browsers (more on that in a moment). But with greater power, comes greater risk of messing up, so just double check your coding. The only trouble you’d have is you’d get the wrong color, nothing to stress over unless you’re some kind of weird perfectionist who HAS to get it on the first try. How a hex-based color works is like this, you have 3 colors primarily, red, green, and blue, in that order (hence RGB in so many place you see online). In each section, you have 2 digits, each digit as a 16 character range. (see table below)
For each character in a hex-coded color, you have to pick between 0 and F in the Hex chart above. That gives you a total of 6 characters to have to choose. Now if you know your permutations, then each color (RGB that is) would have 256 combinations you can choose from. With three groups, it would be 256 X 256 X 256, yielding a total of 16,777,216 colors to pick from. (quite a variety!) HOWEVER, not every browser handles all those colors the same way. Netscape and IE both have different display settings and you really can’t sync them which to me is kinda stupid, but if you want your page to be displayed properly, then you’ll have to pick from the 216 SAFE colors, that is, colors that will show the same way on either browser. These are colors whose RGB groups are sets of pairs, meaning one color has the same two characters (66, 44, AA, FF, etc.) Now you know your limitations when dealing with colors. Now we show you how to pick a color. When you have one of the three base colors in mind, 00 is none of it, and FF is as much of it as you can get. Everything else in between is a varying hue of that color. It’s when you put these three together that you get a color other than red, blue, or green. For instance...FF, FF, and FF together will give you white, while 00, 00, and 00 will give you black. Here is a page that will show you every safe color combination you can get. Even the people of Yum-Chat were kind enough to provide a color page here. Once you have the three color values in mind, you put them together in the proper order, red, green, and blue. So say you want orange, all you have to do is get the right three values, red-ff, green-99, and blue-00. Once you have them, stick them together like so, ff9900 (rrggbb) and you have your hex code for the color orange! To use this, just put it in where it says ‘your color here’ in the above mentioned usage paragraph. BUT, that’s not all, you need to put a # in front of it and it has to be in double quotes, so it would look like this... "#FF9900" Drop that in the proper place and you’re good to go. That’s all there is to know about colors, I hope this helps you and isn’t too confusing since I threw a lot of info out at you so fast. The link above leading to the color chooser can also guide you to a better explanation of Hexcolors. |