Using the digits 000000 to FFFFFF, hexadecimal color codes are used to represent nearly every color seen on the Internet. Here is how hexadecimal colors actually work.
How Hexadecimal Colors Work
In hexadecimal, the numbers A through F are used to extend the base-10 decimal system to a base-16 system:
- 0 = 0
- 1 = 1
- 9 = 9
- A = 10
- B = 11
- C = 12
- D = 13
- E = 14
- F = 15
A hex color is equivalent to an RGB color:
- RGB(0,0,0) is the same as #000000
- RGB(255,255,255) is the same as #FFFFFF
A hex color consists of three sets of two hexadecimal digits. The first two are the amount of red, the second two are the amount of green, and the last two are the amount of blue.
- FF = 255
Decimal to Hexadecimal Conversion
Note that while this converter is limited to hexadecimal numbers from 000000 to FFFFFF, hexadecimal can be used to represent any number that can be represented using decimal notation.
Also note that hexadecimal as a general concept does not require padding zeros to six positions. This is a convention used for denoting hexadecimal colors.
Why the R, G, and B are between 0 and 255
The reason why the max is 255 is because:
- A byte of data is eight bits
- ight bits is equal to 2^8 possible values
- 2^8 = 256
- Since 0 is one of the 256 possible values, a byte frequently represents an integer from 0 to 255
The point being that a hexadecimal color has one byte of data for each of the the R G and B values.
August Garcia is some guy who used to sell Viagra on the Internet. He made this website to LARP as a sysadmin while posting about garbage like user-agent spoofing, spintax, the only good keyboard, virtual assitants from Pakistan, links with the rel="nofollow" attribute, proxies, regular expressions, HTML and CSS, sin, the developer console, and probably some other trash.
Account created 4 months ago.
104 posts, 620 comments, and 116 RAMs.
6 hours ago:
Commented in thread Best Subreddits about SEO?
Post a New Comment
Do you like having a good time?
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
Vandalize the Wiki
Or don't. I'm not your dad.
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.