PDA

View Full Version : HEX color values + 123 colors

IanMarlowe
07-26-2005, 11:59 AM
ok, so we all know there are 16 characters in hex.

0-0 d-13
1-1 e-14
2-2 f-15
3-3
4-4
5-5
6-6
7-7
8-8
9-9
a-10
b-11
c-12

how can one implement these colors into the colors that one must use to make an image? You know, from:
RED:0-255
GREEN:0-255
BLUE:0-255

What is the equivilant to

006699 in the graphic color code?
?
RED:12
GREEN:200
Blue:10
?
Thank You if You do know the answer, and thank you if you don't know it.

Twey
07-26-2005, 12:19 PM
They're exactly the same values. The only difference is that in a lot of image editing suites, the values are in decimal, not hexadecimal. Most calculator programs have a conversion utility.
In Windows "calc":
View->Scientific
Select "hex"
Select "dec"

In KDE's "kcalc":
Make sure Settings->Logic Buttons is ticked
Select "Hex"
Select "Dec"

In Gnome's "gnome-calculator":
View->Scientific
Select "Hex"
Select "Dec"

IanMarlowe
07-26-2005, 12:27 PM
ok, so for example:

006699 would be 26265?

what do you do with that number?

how do you know how much goes to red, green or blue????

Twey
07-26-2005, 12:59 PM
HTML colour codes aren't one number, but are split into three two-digit hex numbers: red, green, blue. Let me give you an example...
#00ff99 means "00 red, ff green, 99 blue." You'd convert them individually - 00ff99 all together means nothing.

mwinter
07-26-2005, 12:59 PM
006699 would be 26265?0x6699 is 26265 decimal, but that isn't how it works.

how do you know how much goes to red, green or blue????Hexadecimal colour codes are the concatenation of three single or double hexadecimal digits. That is, #RGB or #RRGGBB. So, #006699 is 0x00 (0) red, 0x66 (102) green, and 0x99 (153) blue. It could also be written as #069 as the three single-digit form is parsed by repeating each digit. For example, #3fa to #33ffaa.

Mike