codedread

SVG Kickstart 2: Passing Second Grade Geometry with Flying Colors (and Shapes)

by Jeff Schiller, 2005-07-05

Table of Contents

4. Colour Me Stupid

Graphics would not be very exciting without colour. As you have noticed by now, SVG elements can be filled or stroked with a variety of colours. Up to this point I have used English names for these colours (as defined in CSS2), but SVG offers many ways in which colours can be expressed:

English Words ("salmon", "blue") (Expand)

Short Hexadecimal Form ("#8AF") (Expand)

Full Hexadecimal Form ("#80AEFF") (Expand)

RGB Triplet Form ("rgb(100,149,237)") (Expand)

Click to expand any of the above if you are unfamiliar with CSS Color syntax. Any of the above can be used wherever colours are needed to be referenced in SVG.

<<<Prev: 3. The Shape Of Things... Next: 5. Basic Shapes And Colours Are Boring!>>>

codedread codedread