HTML and CSS Reference
In-Depth Information
T ABLE C-7 Color
Intensity Conversion
Table
Color Intensity
Hex Value
Decimal Value
100%
FF
255
80%
CC
204
60%
99
153
40%
66
102
20%
33
51
0%
00
0
maximum color saturation. The safe colors use six possible intensity settings for each value
of red, green, or blue. The settings are 0%, 20%, 40%, 60%, 80%, and 100%. A value of 0%,
0%, 0% on the imaginary color dial is equivalent to black. A value of 100%, 100%, 100%
indicates pure white, while a value of 100%, 0%, 0% is pure red, and so on. The safe colors
are those that have an RGB value set only at one of the safe intensity settings. The hex
conversions for saturation are shown in Table C-7.
Setting a safe color is simply a matter of selecting a combination of safe hex values. In
this case, #9966FF is a safe hex color; #9370DB is not. Most Web editing tools like Adobe
Dreamweaver and Microsoft Expression contain safe color pickers; as do imaging tools such
as Adobe PhotoShop. However, directly mapping an “unsafe” color to its nearest safe color
is fairly easy—just round each particular red, green, or blue value up or down to the nearest
safe value. A complete conversion of hex to decimal values is shown in Table C-8; safe
values are indicated in bold.
00=00
01=01
02=02
03=03
04=04
05=05
06=06
07=07
08=08
09=09
10=0A
11=0B
12=0C
13=0D
14=0E
15=0F
16=10
17=11
18=12
19=13
20=14
21=15
22=16
23=17
24=18
25=19
26=1A
27=1B
28=1C
29=1D
30=1E
31=1F
32=20
33=21
34=22
35=23
36=24
37=25
38=26
39=27
40=28
41=29
42=2A
43=2B
44=2C
45=2D
46=2E
47=2F
48=30
49=31
50=32
51=33
52=34
53=35
54=36
55=37
56=38
57=39
58=3A
59=3B
60=3C
61=3D
62=3E
63=3F
64=40
65=41
66=42
67=43
68=44
69=45
70=46
71=47
72=48
73=49
74=4A
75=4B
76=4C
77=4D
78=4E
79=4F
80=50
81=51
82=52
83=53
T ABLE C-8 RGB to Hexadecimal Color Conversion Chart
 
Search WWH ::




Custom Search