Free AdviceGet Free Advice
Home | Get advice | Give advice | Topics | Columnists | - !START HERE! -
Make Suggestions | Sitemap

Get Advice


Search Questions

Ask A Question

Browse Advice Columnists

Search Advice Columnists

Chat Room

Give Advice

View Questions
Search Questions
Advice Topics

Login

Username:
Password:
Remember me
Register for free!
Lost Password?

Want to give Advice?

Sign Up Now
(It's FREE!)

Miscellaneous

Shirts and Stuff
Page Backgrounds
Make Suggestions
Site News
Link To Us
About Us
Terms of Service
Help/FAQ
Sitemap
Contact Us


Advicenators discussion: hexadecimal color codes


theymos wrote Wednesday February 14 2007, 9:01 am:
HTML uses hexadecimal color codes. Hexadecimal means base 16. Normally we use base 10(decimal). Instead of counting to 9, it counts to 15. So the hexadecimal numbers are:
0=0
1-1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
A=10
B=11
C=12
D=13
E=14
F=15
10=16
...
F0=240(F=15, so 15*16(because it's hexadecimal) equals 256)
...
FF=255(F=15. 15*16=240. 240+15=255)
So to convert from hexadecimal to decimal, take the number in the "tens place", and multiply by 16. Then add the number in the "ones place".

The color code has 4 parts to it:
# -a hash/number symbol
RR -the amount of red
GG -the amount of green
BB -the amount of blue
#RRGGBB -the color code

#000000 is black
#FFFFFF is white
#FF0000 is dark red
#00FF00 is dark green
#0000FF is dark blue
#FFFF00 is yellow
#FF00FF is pink
#00FFFF is cyan

Increasing numbers makes the color brighter, decreasing it makes it darker. It's different then pain, since paint is "subtractive". Color codes are "additive"
theymos wrote Monday June 18 2007, 6:36 am:
You can test your color codes on my Theymos Web Services template site, here:
[Link](Mouse over link to see full location)
Click "manual".
theymos wrote Monday June 18 2007, 6:56 am:
Now that I read this again, it isn't entirely clear. Colors go from 0 to 255, darkest to brightest. FF=255. 00=0. F=15. FF=15*16+15, 255.

First number in a 2-digit hexadecimal is always multiplied by 16. Second number is added to the first, after multiplication.

FF --Hexadecimal
F,F --The two hexadecimal numbers
15,15 --Hexadecimal to decimal
15*16,15 --First number is multiplied by 16
240+15 --Second number is added to first
255 --Decimal

A0 --Hexadecimal
A,0 --The two hexadecimal numbers
10,0 --Hexadecimal to decimal
10*16,0 --First number is multiplied by 16
160+0 --Second number is added to first
160 --Decimal

DEADBE -hexadecimal color code
DE,AD,BE -individual hexadecimal numbers
13 14,14 10,11 14 -hexadecimal to decimal
13*16 14,14*16 10, 11*16 14 -first number is multiplied by 16
208+14,224+10,176+14 -second number is added to first
222,234,190 -decimal color codes. 222 Red, 234 green, 190 blue. This turns out to be a pinkish color.


Reply to topic

Whoa, hold up there! You have to be logged in to reply to this topic.

Login

Username:
Password:
Remember me
Register for free!
Recent popular questions:
Want to give advice?

Click here to start your own advice column!

What happened here with my gamer friends?

All content on this page posted by members of advicenators.com is the responsibility those individual members. Other content © 2003-2014 advicenators.com. We do not promise accuracy, completeness, or usefulness of any advice and are not responsible for content.

Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content.
Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.

[Valid RSS] eXTReMe Tracker