Exista instructiuni care au atribute prin
care se pot specifica culori (ex.: COLOR, BGCOLOR, BORDERCOLOR, etc.). Culorile
se pot specifica prin numele lor
(in engleza, de ex.: red, white, etc.) sau prin valoarea RGB. Culorile se
obtin prin combinarea culorilor de baza Red, Green, Blue si rezulta un grup
de 6 cifre hexazecimale precedate de semnul # (de ex.: BODY BGCOLOR = # FF0000
are ca rezultat un fond al paginii de culoare rosie). R, G, B sunt initialele
culorilor de baza: R (Red = rosu), G (Green = verde), B (Blue = albastru).
Primele 2 cifre din cele 6 reprezinta valoarea lui R, urmatoarele 2 valoarea
lui G iar ultimele 2 pentru B. Pentru a obtine culori care sunt afisate la
fel pe orice sistem (Windows, Macintosh) este bine sa folosim asa - numitele
culori sigure Internet.
Baza 10 are ca cifre: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Baza 16 are ca cifre: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a (= 10), b (= 11), c (= 12), d (= 13), e (= 14) f (= 15).
Urmatorul tabel nu cuprinde toate nuantele
care se pot obtine pentru R = 00; deoarece ele sunt valori exprimate in baza
16, intre B = 00 si B = 11 exista valorile: 01, 02, 03, 04, 05, 06, 07, 08,
09, 0a, 0b, 0c, 0d, 0e, 0f, 10. Idem pentru G.
R=00 | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
Se pot realiza si alte tabele cu nuantele
culorilor obtinute pentru diferite valori ale lui R deoarece intre R = 00
si R = 33 exista o multime de valori pe care le poate lua R (01, 02, ...
, 0f, 10, 11, 12, ... , 1f, 20, 21, 22 , ... 2f, 30, 31, 32) dar diferentele
sunt relativ mici; le puteti realiza singur inlocuind in codul sursa (folosind
functia REPLACE a editorului de texte: inlocuiti #XX (primele doua cifre
din toate
sirurile #xxxxxx ce apar in cadrul unui singur tabel) cu valoarea dorita
(de ex. #0f)); in continuare apar numai tabelele construite pentru R = 33,
66, 99, cc, ff.
R=33 | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
R=66 | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
R=99 | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
R=cc | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
R=ff | B = |
---|
00 | 11 | 22 | 33 | 44 | 55 | 66 |
77 | 88 | 99 | aa | bb | cc | dd | ee | ff
|
G = |
00 | |
| |
| |
| |
| |
| |
| |
| |
|
---|
11 | |
| |
| |
| |
| |
| |
| |
| |
|
22 | |
| |
| |
| |
| |
| |
| |
| |
|
33 | |
| |
| |
| |
| |
| |
| |
| |
|
44 | |
| |
| |
| |
| |
| |
| |
| |
|
55 | |
| |
| |
| |
| |
| |
| |
| |
|
66 | |
| |
| |
| |
| |
| |
| |
| |
|
77 | |
| |
| |
| |
| |
| |
| |
| |
|
88 | |
| |
| |
| |
| |
| |
| |
| |
|
99 | |
| |
| |
| |
| |
| |
| |
| |
|
aa | |
| |
| |
| |
| |
| |
| |
| |
|
bb | |
| |
| |
| |
| |
| |
| |
| |
|
cc | |
| |
| |
| |
| |
| |
| |
| |
|
dd | |
| |
| |
| |
| |
| |
| |
| |
|
ee | |
| |
| |
| |
| |
| |
| |
| |
|
ff | |
| |
| |
| |
| |
| |
| |
| |
|
antiquewhite |
aqua |
aquamarine |
azure |
azure |
beige |
bisque |
black |
blanchedalmond |
blue |
blueviolet |
brown |
burlywood |
cadetblue |
chartreuse |
chocolate |
coral |
cornflowerblue |
cornsilk |
crimson |
cyan |
darkblue |
darkcyan |
darkgoldenrod |
darkgray |
darkgreen |
darkkhaki |
darkmagenta |
darkolivegreen |
darkorange |
darkorchid |
darkred |
darksalmon |
darkseagreen |
darkslateblue |
darkslategray |
darkturquoise |
darkviolet |
deeppink |
deepskyblue |
dimgray |
dodgerblue |
firebrick |
floralwhite |
forestgreen |
fuchsia |
gainsboro |
ghostwhite |
gold |
goldenrod |
gray |
green |
greenyellow |
honeydew |
hotpink |
indianred |
indigo |
ivory |
khaki |
lavender |
lavenderblush |
lawngreen |
lemonchiffon |
lightblue |
lightcoral |
lightcyan |
lightgoldenrodyellow |
lightgreen |
lightgrey |
lightpink |
lightsalmon |
lightseagreen |
lightskyblue |
lightslategray |
lightsteelblue |
lightyellow |
lime |
limegreen |
linen |
magenta |
maroon |
mediumaquamarine |
mediumblue |
mediumorchid |
mediumpurple |
mediumseagreen |
mediumslateblue |
mediumspringgreen |
mediumturquoise |
mediumvioletred |
midnightblue |
mintcream |
mistyrose |
moccasin |
navajowhite |
navy |
oldlace |
olive |
olivedrab |
orange |
orangered |
orchid |
palegoldenrod |
palegreen |
paleturquoise |
palevioletred |
papayawhip |
peachpuff |
peru |
pink |
plum |
powderblue |
purple |
red |
rosybrown |
royalblue |
saddlebrown |
salmon |
sandybrown |
seagreen |
seashell |
sienna |
silver |
skyblue |
slateblue |
slategray |
snow |
springgreen |
steelblue |
tan |
teal |
thistle |
tomato |
turquoise |
violet |
wheat |
white |
whitesmoke |
yellow |
yellowgreen |
Este posibil ca browserul sa nu poata afisa
anumite culori specificate prin valoarea RGB, insa va incerca sa genereze o culoare
apropiata (prin dithering = difuzie) sau un fond texturat format din doua culori apropiate
celei specificate; se poate ajunge astfel la un fond care poate face textul ilizibil.
Pentru a evita aceasta situatie, este bine sa
folosim asa - numitele culori sigure Internet, care sunt afisate la fel pe orice sistem
(Windows, Macintosh).
Pentru fiecare dintre culorile de baza, R (Red = rosu), G (Green = verde), B
(Blue = albastru) trebuie sa alegem una din valorile : 00, 33, 66, 99, CC sau FF.