Question for the HTML inclined
Angels World
12-09-2007, 19:40
I was playing around with RGB codes yesterday, and I now have a beautiful background on my desktop The RGB code for it is, 170, 0, 0, and I was wondering if someone was good enough with HTML to give me the hex code, or to point me to a website where I could type this in? I am thinking about using it for the background of the website I am trying to build.
The Alma Mater
12-09-2007, 19:48
A 3 second googlesearch yielded:
http://www.drpeterjones.com/colorcalc/
And AA0000.
Pure Metal
12-09-2007, 19:58
a useful little program for this sort of thing can be found here http://prall.net/colorcop/
The_pantless_hero
12-09-2007, 20:00
http://img265.imageshack.us/img265/3364/googleev6.jpg
Ruby City
12-09-2007, 21:21
Let me explain how to do this by hand just to show off my math skills.
Hexadecimal numbers have 16 digits instead of 10, the extra digits that come after 9 are the letters A to F. So instead of "...8, 9, 10, 11..." hexadecimal goes "...8, 9, A, B, C, D, E, F, 10, 11...".
HTML color codes are RGB in hexadecimal, the first 2 digits are red, the middle 2 are green and the last 2 are blue like this "#RRGGBB".
To convert from normal numbers to hexadecimal...
1. "number % 16 = last digit" where % is modulus. "170 % 16 = 10", but as I said above A comes after 9 so 10 in normal numbers is A in hexadecimal and 11 is B and so on. The last digit is A.
2. Divide the number by 16, round down and start over at step 1 again. "170 / 16 = 10.625", "10 % 16 = 10" the second last digit is also A and that was all digits since we can't repeat again ("10 / 16" rounded down is 0). The whole number is AA.
Then do the same for blue and green which are both 00 in this case.
#AA0000
Most things that have a color eyedrop, can display in both modes.
Angels World
14-09-2007, 22:10
Thank you everyone for your help. I am building my website from the ground up using HTML in Microsoft Word. That seems to be the easiest way to do things.
The math was pretty confusing, but I appreciate you taking the time to give me the steps, Ruby City. :)
Thank you everyone for your help. I am building my website from the ground up using HTML in Microsoft Word. That seems to be the easiest way to do things.
The math was pretty confusing, but I appreciate you taking the time to give me the steps, Ruby City. :)
You shouldn't use Word for editeng text files like HTML. It does a bunch of stuff to make your words look pretty which tends to get in the way of writing code. However, MS's text editor is just terrible(lacks simple shit such as syntax hilighting. I'd recommend Notepad++ instead.
http://notepad-plus.sourceforge.net/uk/site.htm
UpwardThrust
15-09-2007, 01:11
You shouldn't use Word for editeng text files like HTML. It does a bunch of stuff to make your words look pretty which tends to get in the way of writing code. However, MS's text editor is just terrible(lacks simple shit such as syntax hilighting. I'd recommend Notepad++ instead.
http://notepad-plus.sourceforge.net/uk/site.htm
Or textpad
OR crimson
Or Scite
All good "notepad" replacements with syntax highlighting capabilities :)
Or textpad
OR crimson
Or Scite
All good "notepad" replacements with syntax highlighting capabilities :)Just as long as it isn't notepad.
Amor Pulchritudo
15-09-2007, 02:12
I was playing around with RGB codes yesterday, and I now have a beautiful background on my desktop The RGB code for it is, 170, 0, 0, and I was wondering if someone was good enough with HTML to give me the hex code, or to point me to a website where I could type this in? I am thinking about using it for the background of the website I am trying to build.
Here sweetie... http://images.google.com.au/images?sourceid=navclient&ie=UTF-8&rlz=1T4DAAU_enAU237AU237&q=hex%20codes&oe=UTF-8&um=1&sa=N&tab=wi
I use a basic hex code table. If you just make up the rgb codes, they mightn't appear as the same colour on everyone's computer. If you use a table, you should be fine.
Copiosa Scotia
15-09-2007, 04:36
Real men use standard Notepad. :p
The Alma Mater
15-09-2007, 08:16
Real men use standard Notepad. :p
Not vi ?