Here's the handiest way yet to find any of the basic 216 Netscape color codes you want - courtesy of, written by, and copyrighted by Steve Nelson, Clear Ink Corporation.
Drag your mouse onto the color you want to see - the background of this page will become that color. Once you've found the color you're looking for, click on it to lock it in and look in the box at the bottom of the screen - it will give you the 6-digit color code for that color. Simply insert that code for the background color on your webpage. If you want to change colors, just click on the next color you want, then move your cursor off it and then back to it and click again.
Courtesy of [email protected]
It's easy to change the color buttons in this chart to any color you want. Just right-click on the background of this page and select *View Source*, then scroll to the list of JavaScripts. Each table data *TD* line will have a 6-digit code for colors in 2 places, the first beginning with *bgcolor* and the second in parenthesis, that has this format : "#rrggbb", where r, g, and b are color code couplets, with digits from 0 to f, for the 3 primary colors of red, green and blue. (Note : Each table data line appears in the source code as 4 lines, but each is actually only 1 line that begins and ends with the TD and /TD tags.)
To change the color in a box in the Color Cube, just change the 6-digit code in both places in each table data line to the code for the color you want to see. For example, if you go to the first JavaScript table data line and change the color codes from #000000 to #ffffff in both places and then save the changes, your color cube will now show white in the top left color square (instead of black) and will change the background to white when you touch it with your cursor. You can make similar changes to any or all of the table data lines to create a new chart of your own custom colors.
You'll notice that the first set is "#000000" - this represents the code 00 for red, 00 for green, and 00 for blue, producing the color black. Each digit is a hexadecimal number ranging from 0 to f (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f), from darkest to lightest. Every color is made up of combinations of these digits.
For an example of coding new colors, let's look at the range of off-white colors. Touch the color square on the bottom right corner of the cube and look at the code in the box - it shows #ffffff (white). Now touch the 6th color square to the left of the bottom right corner - it shows the code #ffff00 (yellow). In between these two codes are 254 more combinations you can make, for a total of 256 colors using the code #ffffbb.
Let's say you want a chart of off-white colors. The code, going from #ffffff (white) to #ffff00 (yellow), would be #fffffe, then #fffffd, #fffffc, #fffffb, #fffffa, #fffff9, #fffff8, etc., until you get to #fffff0. Then you do the same with the second digit from the right - #ffffef, #ffffee, #ffffed, #ffffec, #ffffeb, #ffffea, #ffffe9, #ffffe8, etc., until you get to #ffffe0. Your next set would begin with #ffffdf, the set after that begins with #ffffcf, etc., until you've recoded all 256 possibilities beginning with #ffff.
Unfortunately, the Color Cube is formatted as a block of 12 rows of 18 columns to display the Netscape 216 color scheme, rather than 16 rows of 16 columns that you can generate as I showed you above, so some changing of the HTML code is necessary if you want to generate the full range of colors available in a cube format like the Color Cube.
For the sake of being complete, I'll show you how to make those changes, but you really don't need to go that far to be able to create your new color cube. The information above is sufficient to generate all the colors you want, but you'll find that most of them (if you use the full list of codes available) are so close that you can't tell them apart. Usually every 6th color is sufficient, but feel free to experiment.
One bit of advice is in order here - not all browsers (or PCs) support all of these colors, so some people won't see your pages in the exact colors you display. Only the colors shown in the Color Cube are truly "safe" colors, but don't let that stop you - go ahead and have fun!
If you scroll thru the lines of table data, you'll notice that there are 18 of them between each table row *TR* tag. The first thing you want to do is to delete 2 of the table data lines so that there are only 16 in each table row.
Now copy any 1 entire table row - this will consist of all the lines between and including the TR and /TR tags - and paste that entire row 4 times in each table row to make a total of 16 rows.
That's all there is to it except for changing the color codes in each of the copied table rows to your new custom colors. If you forget to make those changes, you'll see those colors as the same colors as the row you copied.
You now have everything you need to create complete cubes of your own custom colors - that wasn't so hard, was it?
Enjoy!
|
|
