color.html.docx

4
CSS uses color values to specify a color. Typically, these are used to set a color either for the foreground of an element(i.e., its text) or else for the background of the element. They can also be used to affect the color of borders and other decorative effects. You can specify your color values in various formats. ollo!ing table tells you all possible formats" Format Syntax Example #ex Code $%%&&'' pcolor"$*+ Short #ex Code $%&' pcolor"$-*+ %&' / rgb(rrr/,ggg/,bbb/) pcolor"rgb(0/,0/,0/)* + %&' -bsolute rgb(rrr , ggg,bbb) pcolor"rgb(,,100)*+ key!ord a2ua, black, etc. pcolor"teal*+ These formats are explained in more detail in the follo!ing sections" C SS C olors - Hex C odes: - hexadecimal is a digit representation of a color. The first t!o digits(%%) represent a red value, the next t!o are a green value(&&), and the last are the blue value(''). - hexadecimal value can be taken from any graphics soft!are like -dobe 3hotoshop, 4asc 3aintshop 3ro or even using -dvanced 3aint 'rush. 5ach hexadecimal code !ill be preceded by a pound or hash sign $. ollo!ing are the examples to use #exadecimal notation. Color Color HEX  $  $  $  $  $  $  $  $CCC  $ C SS C olors - S hort H ex C ode s: This is a shorter form of the six6digit notation. 7n this format, each digit is replicated to arrive at an e2uivalent six6digit value* or example" $- becomes $--.

Upload: deepu-deepak

Post on 08-Jan-2016

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: color.html.docx

7/17/2019 color.html.docx

http://slidepdf.com/reader/full/colorhtmldocx 1/4

CSS uses color values to specify a color. Typically, these are used to set a color either for theforeground of an element(i.e., its text) or else for the background of the element. They can also be used toaffect the color of borders and other decorative effects.

You can specify your color values in various formats. ollo!ing table tells you all possible formats"

Format Syntax Example

#ex Code $%%&&'' pcolor"$*+

Short #ex Code $%&' pcolor"$-*+

%&' / rgb(rrr/,ggg/,bbb/) pcolor"rgb(0/,0/,0/)*+

%&' -bsolute rgb(rrr,ggg,bbb) pcolor"rgb(,,100)*+

key!ord a2ua, black, etc. pcolor"teal*+

These formats are explained in more detail in the follo!ing sections"

CSS Colors - Hex Codes:

- hexadecimal is a digit representation of a color. The first t!o digits(%%) represent a red value, the nextt!o are a green value(&&), and the last are the blue value('').

- hexadecimal value can be taken from any graphics soft!are like -dobe 3hotoshop, 4asc 3aintshop 3ro oreven using -dvanced 3aint 'rush.

5ach hexadecimal code !ill be preceded by a pound or hash sign $. ollo!ing are the examples to use#exadecimal notation.

Color Color HEX

  $

  $

  $

  $

  $

  $

  $

  $CCC

  $

CSS Colors - Short Hex Codes:

This is a shorter form of the six6digit notation. 7n this format, each digit is replicated to arrive at ane2uivalent six6digit value* or example" $- becomes $--.

Page 2: color.html.docx

7/17/2019 color.html.docx

http://slidepdf.com/reader/full/colorhtmldocx 2/4

- hexadecimal value can be taken from any graphics soft!are like -dobe 3hotoshop, 4asc 3aintshop 3ro oreven using -dvanced 3aint 'rush 5ach hexadecimal code !ill be preceded by a pound or hash sign $.

ollo!ing are the examples to use #exadecimal notation.

Color Color HEX

  $

  $

  $

  $

  $

  $

  $

  $

CSS Colors - RGB Values:

This color value is specified using the rib( ) property. This property takes three values, one each for red,

green, and blue. The value can be an integer bet!een and 100 or a percentage.

NOTE: -ll the bro!sers does not support rib() property of color so it is recommended not to use it.

ollo!ing is the example to sho! fe! colors using %&' values.

Color Color RGB

  rib(,,)

  rib(100,,)

  rib(,100,)

  rib(,,100)

  rib(100,100,)

  rib(,100,100)

  rib(100,,100)

  rib(891,891,891)

  rib(100,100,100)

Building Color Codes:

You can build millions of color codes using our Color Code 'uilder. Check our #T:; Color Code 'uilder. To

use this tool you !ould need a 4ava 5nabled 'ro!ser.

Browser Safe Colors:

Page 3: color.html.docx

7/17/2019 color.html.docx

http://slidepdf.com/reader/full/colorhtmldocx 3/4

#ere is the list of 18 colors !hich are supposed to be most safe and computer independent colors. Thesecolors very from hexa code to . These color are safe to use because they ensure that all

computers !ould display the colors correctly !hen running a 10 color palette"

<< 99 CC

<< <<<< << <<99 <<CC <<

<< 99 CC

99 99<< 99 9999 99CC 99

CC CC<< CC CC99 CCCC CC

<< 99 CC

<< <<<< << <<99 <<CC <<

<<<< <<<<<< <<<< <<<<99 <<<<CC <<<<

<< <<<< << <<99 <<CC <<

<<99 <<99<< <<99 <<9999 <<99CC <<99

<<CC <<CC<< <<CC <<CC99 <<CCCC <<CC

<< <<<< << <<99 <<CC <<

<< 99 CC

<< <<<< << <<99 <<CC <<

<< 99 CC

99 99<< 99 9999 99CC 99

CC CC<< CC CC99 CCCC CC

<< 99 CC

99 99<< 99 9999 99CC 99

99<< 99<<<< 99<< 99<<99 99<<CC 99<<

99 99<< 99 9999 99CC 99

9999 9999<< 9999 999999 9999CC 9999

99CC 99CC<< 99CC 99CC99 99CCCC 99CC

99 99<< 99 9999 99CC 99

CC CC<< CC CC99 CCCC CC

CC<< CC<<<< CC<< CC<<99 CC<<CC CC<<

CC CC<< CC CC99 CCCC CC

CC99 CC99<< CC99 CC9999 CC99CC CC99

CCCC CCCC<< CCCC CCCC99 CCCCCC CCCC

CC CC<< CC CC99 CCCC CC

<< 99 CC

<< <<<< << <<99 <<CC <<

Page 4: color.html.docx

7/17/2019 color.html.docx

http://slidepdf.com/reader/full/colorhtmldocx 4/4

<< 99 CC

99 99<< 99 9999 99CC 99

CC CC<< CC CC99 CCCC CC

<< 99 CC