CSS ne pune la dispoziţie o bază cu 16,777,216 de culori, ce le putem scrie fie cu nume, valori RGB (red-green-blue) fie cu o combinaţie numercă denumită hex.
roşu
Îl putem scrie asa
rgb (255,0,0)
Sau asa
rgb (100%,0%,0%)
Desigur si metoda asta e buna
#ff0000
Sau mai scurt
#foo
Avem 17 nume ce definesc culori, desigur sunt în limba engleză : aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, si yellow.
Un secret! transparent este o valoare ce poate fi folosită
În formatul de culori RGB, valorile unei culori pot fi cuprinse între 0 (zero) ,ce înseamna cel mai mic nivel din acea culoare (adica ceva de genul “fara roşu”) , şi 255 ( cu alte cuvinte putem spune “maxim de roşu”).Aceste valori mai pot fi scrise şi sub forma procentajelor.
Acum să vă explic care e treaba cu hex.
Hex, vine de la hexadecimal (aşa se spunea, dar cică acum se spune sexadecimal ), reprezentând sistemul numeric in baza 16(pompos?).E simplu : noi normal folosim sistem numeric in baza 10, adică numerele de la 0 la 9, dar aici avem numere de la 0(zero) la f, adica 0,1,2,3,4,5,6,7,8,9 plus a,b,c,d,e,f. Cum se construieşte un cod de culoare în baza 16, adică hexadecimal : avem # pentru a eticheta culoare, şi codul ( Ex: #f00 asta fiind varianta comprimată, #ff0000 este varianta de 6 indici, sau #c96 sub forma de 6 devine #cc9966). Care e diferenţa dintre a folosi 3 sau 6 indici , păi simplu, ai mai mult control asupra culorii, adică te poţi juca cu noanţele, mult mai amănunţit
“color” sau “background-color”
Culorile în documentul CSS le vom scrie folosind color şi background-color. Să spunem că avem background albastru şi scris galben pentru titlurile cu tag-ul h1, codul ar arăta aşa :
h1 {
color: yellow;
background-color: blue;
}
Normal că poţi schimba numele de culori cu acele coduri cu #, asta desigur pentru adeţine control mai mare asupra noanţelor!Cele 2 comenzi , color şi backgorund-color, pot fi folosite la toate elementele din CSS ce sunt descrise de tag-urile HTML.
![header=[] body=[andrew.cornett posted a photo:
Just squeezed out this HTML email in about an hour or so thanks to MailChimp!. ReadyTech HTML Email] andrew.cornett posted a photo:
Just squeezed out this HTML email in about an hour or so thanks to MailChimp!. ReadyTech HTML Email](http://farm4.static.flickr.com/3004/3048902260_14465ef17e_s.jpg)
![header=[] body=[Toni Panayotov posted a photo:
The first concept for the homepage of a school project. Client: Mambo Lounge Nightclub San Francisco CA. mambo_lounge] Toni Panayotov posted a photo:
The first concept for the homepage of a school project. Client: Mambo Lounge Nightclub San Francisco CA. mambo_lounge](http://farm4.static.flickr.com/3251/3047025017_eeef7db1e9_s.jpg)
![header=[] body=[tractorpirate posted a photo:
. www.m7lives.com] tractorpirate posted a photo:
. www.m7lives.com](http://farm4.static.flickr.com/3167/3046291353_4670b108ae_s.jpg)
![header=[] body=[comsodesign88 posted a photo:
planning on a new business card, so im starting to create som mock ups... business card mock up] comsodesign88 posted a photo:
planning on a new business card, so im starting to create som mock ups... business card mock up](http://farm4.static.flickr.com/3030/3046910170_5298b8d0e0_s.jpg)
![header=[] body=[SprittiBee posted a photo:
Who's scared? Looks like he is more than I am.. l-n-c2] SprittiBee posted a photo:
Who's scared? Looks like he is more than I am.. l-n-c2](http://farm4.static.flickr.com/3219/3046074967_077a125c2c_s.jpg)
![header=[] body=[tracystone posted a photo:
Website Design and development for Teahouse Media.
teahousemedia.com. Teahouse Media Website Design] tracystone posted a photo:
Website Design and development for Teahouse Media.
teahousemedia.com. Teahouse Media Website Design](http://farm4.static.flickr.com/3054/3046020827_68efee7d31_s.jpg)
![header=[] body=[Noah and Cat posted a photo:
In the next few months, life and time willing, I plan on starting a news website for the canal community in England, Ireland, Scottland and Wales. This is an in-progress design mock-up of where I'm headed. I'm not quite sure what to do with the bottom bit yet but I'm browsing other news sites for ideas.
The content right now is purely artificial. In most spots anyway.. Towpath Telegraph (In Progress)] Noah and Cat posted a photo:
In the next few months, life and time willing, I plan on starting a news website for the canal community in England, Ireland, Scottland and Wales. This is an in-progress design mock-up of where I'm headed. I'm not quite sure what to do with the bottom bit yet but I'm browsing other news sites for ideas.
The content right now is purely artificial. In most spots anyway.. Towpath Telegraph (In Progress)](http://farm4.static.flickr.com/3183/3045738255_8a8bd11d30_s.jpg)
![header=[] body=[jpguarin posted a photo:
Nueva pagina de VSP*
www.vsp.com.co. www.vsp.com.co] jpguarin posted a photo:
Nueva pagina de VSP*
www.vsp.com.co. www.vsp.com.co](http://farm4.static.flickr.com/3159/3045426395_e83cb3f50f_s.jpg)
![header=[] body=[kpucu.com posted a photo:
Redesign for www.bgstar.eu. BgStar.EU redesign] kpucu.com posted a photo:
Redesign for www.bgstar.eu. BgStar.EU redesign](http://farm4.static.flickr.com/3056/3045346683_ac042695e2_s.jpg)


