Coloring Shapes

You may have noticed that I've specified colors so far using words like "red" , "blue" , "green" , and so on. In fact, there are three ways to specify colors in VML:

  • Using a predefined color name : fillcolor="red"

  • Using the rgb function: fillcolor="rgb(255,0,0)"

  • Specifying a direct value: fillcolor="#FF0000"

You can use the HTML 4.0 predefined color names in VML:

  • aqua

  • black

  • blue

  • fuchsia

  • gray

  • green

  • lime

  • maroon

  • navy

  • olive

  • purple

  • red

  • silver

  • teal

  • white

  • yellow

You can also specify colors by giving the red, green, and blue color values in the rgb function like this: rgb( rrr , ggg , bbb ) , where rrr is the red color value, ggg is the green color value, and bbb is the blue color value, all of which range from to 255 . Or, you can give those color values directly using hexadecimal digits, as you would in HTML, like this: "# rrrgggbbb " . For example, "000000" is black, "#0000FF" is bright blue, "#FFFFFF" is white, and so on.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net