MySpace

O'Reilly diyINcite - MySpace Blog Insight into do-it-yourself MySpace web scripting, digital imaging, and more

OReilly DIYincite



Last Updated: 5/21/2007

Send Message
Instant Message
Email to a Friend
Subscribe
Sunday, October 01, 2006 
More than 16 Million colors are available for use in MySpace. Seventeen colors have defined names in HTML. These colors can be selected using their name. Here are the 17 named HTML colors:


aquablackbluefuchsiagraygreenlimemaroonnavy
oliveorangepurpleredsilvertealwhiteyellow


For example, you can create an HTML table with a red background using the following code:


I'd really like a red background for this text.
Let's see if this code works...



What about the other 16,777,999 HTML colors?

The other 16,777,999 colors must be selected using their hexadecimal code. In HTML, there are multiple ways to select colors using hexadecimal codes. However, some of these methods involve the use of the "pound" .. character, which MySpace does not allow (for security reasons).

If you'd like to use a hexadecimal color selector in MySpace, the only method available is to use a six-character string of hexadecimal digits. A "hexadecimal digit" can be any of the following characters:

0 1 2 3 4 5 6 7 8 9 A B C D E F


For example, here's some code that creates an HTML table with a background color selected using a randomly selected hexadecimal color code:


<table bgcolor="3399DD"><tr><td>
Hmm... I wonder what color this code is going to produce???
In any case, since I've specified 6 hexadecimal characters for my color code,
I should get a valid table that displays this text on a colored rectangular background.
I hope I picked a color that doesn't make my black text unreadable...
</td></tr></table>


This code produces the following when it's displayed in a web browser:


Hmm... I wonder what color this code is going to produce???
In any case, since I've specified 6 hexadecimal characters for my color code,
I should get a valid table that displays this text on a colored rectangular background.
I hope I picked a color that doesn't make my black text unreadable...


Yup, it's readable.


Give me the color I want!

But we don't really want to just randomly enter hex codes every time we want a colored background on a profile, bulletin, or blog post. So, here's a chart that shows some of the colors that are available.

Note that all 16,777,216 available colors are NOT included in this table. With 16 colors in each row, a table that shows all the colors would more than 4 miles long on a typical computer screen! That's how many colors are actually available in HTML.

Here are 64 of the HTML colors, along with their hexadecimal color codes:

5500FF5500AA5500555500000000000000550000AA0000FF
5555FF5555AA5555555555000055000055550055AA0055FF
55AAFF55AAAA55AA5555AA0000AA0000AA5500AAAA00AAFF
55FFFF55FFAA55FF5555FF0000FF0000FF5500FFAA00FFFF
FFFFFFFFFFAAFFFF55FFFF00AAFF00AAFF55AAFFAAAAFFFF
FFAAFFFFAAAAFFAA55FFAA00AAAA00AAAA55AAAAAAAAAAFF
FF55FFFF55AAFF5555FF5500AA5500AA5555AA55AAAA55FF
FF00FFFF00AAFF0055FF0000AA0000AA0055AA00AAAA00FF


If you want a color between two of the adjacent shades above, experiment by selecting a hexadecimal code that is "between" the two displayed codes. In doing this, you should consider the letters A-F to be digits greater than 9. For example, the hexadecimal digit A is one greater than the hexadecimal digit 9, the hexadecimal digit C is three greater than 9, and the hexadecimal digit F is 5 greater than hexadecimal digit 9.


References



Tired of wondering how other people make their cool MySpace profile pages? Then it's about time you really learn HTML and CSS, the basis of everything you see on MySpace.com. Finally you'll be able to create the MySpace page and any other Web page you've always wanted.




This book starts from the beginning-- defining the Internet, the Web, browsers, and URLs -- so you don't need to have any previous knowledge about how the Web works. After reading this book, you'll have a solid foundation in HTML, graphics, and design principles that you can immediately put to use in creating effective web pages.