RGB coloursColours are defined in RGB code as combination of Red, Green and Blue.Decimal codeIn Decimal code, the quantities of red, green and blue are numbers from 0 to 255. For example:BODY { background: rgb(51,153,255); color: rgb(102,255,255); } Hexadecimal codeIn Hexadecimal code, the same quantities are hexadecimal numbers from 00 to FF. For example:BODY { background: #3399FF ; color: #66FFFF ; } Look this comparative table:
Colour paletteA real palette has at least 216 colours (below):
There are the equivalents decimal palette and hexadecimal palette. Tip: use the RGB palette values as a starting reference; then adjust them step by step, according to taste and needs. Try this:
Text and background coloursText and background colours should be always declared together;the resulting colour combination should assure a good readability. A background without a particular colour should be declared transparent. Using a transparent background, we may superimpose a text over another background. DIV.color1 { background: rgb(255,51,51); color:rgb(0,0,0); } P.color2 { background: transparent; color: rgb(255,255,255); }<DIV class="color1"> A red background... <P class="color2">A paragraph with transparent background.</P> </DIV>
A red background...
A paragraph with transparent background. Next page : how to define the appearance of the borders of a section of the page. |